You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Better error diagnostics for cyclic references (#19408)
We now suggest to compile with -explain-cyclic, in which case we give a
trace of the forcings that led to the cycle.
The reason for the separate option is that maintaining a trace is not
free so we should not be doing it by default.
Copy file name to clipboardExpand all lines: compiler/src/dotty/tools/dotc/config/ScalaSettings.scala
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,7 @@ trait CommonScalaSettings:
120
120
// -explain-types setting is necessary for cross compilation, since it is mentioned in sbt-tpolecat, for instance
121
121
// it is otherwise subsumed by -explain, and should be dropped as soon as we can.
122
122
valexplainTypes:Setting[Boolean] =BooleanSetting("-explain-types", "Explain type errors in more detail (deprecated, use -explain instead).", aliases =List("--explain-types", "-explaintypes"))
123
+
valexplainCyclic:Setting[Boolean] =BooleanSetting("-explain-cyclic", "Explain cyclic reference errors in more detail.", aliases =List("--explain-cyclic"))
123
124
valunchecked:Setting[Boolean] =BooleanSetting("-unchecked", "Enable additional warnings where generated code depends on assumptions.", initialValue =true, aliases =List("--unchecked"))
124
125
vallanguage:Setting[List[String]] =MultiStringSetting("-language", "feature", "Enable one or more language features.", aliases =List("--language"))
125
126
valexperimental:Setting[Boolean] =BooleanSetting("-experimental", "Annotate all top-level definitions with @experimental. This enables the use of experimental features anywhere in the project.")
0 commit comments