From a803f63e2fb88a4c53a5647692ae9051744d24db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Doeraene?= Date: Wed, 2 Dec 2020 13:47:44 +0100 Subject: [PATCH 1/7] Remove unused setting -Xrepl-line-width. --- compiler/src/dotty/tools/dotc/config/ScalaSettings.scala | 1 - 1 file changed, 1 deletion(-) diff --git a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala index 4b42d4206cfc..2e0589f593ab 100644 --- a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala +++ b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala @@ -118,7 +118,6 @@ class ScalaSettings extends Settings.SettingGroup with CommonScalaSettings { val XprintSuspension: Setting[Boolean] = BooleanSetting("-Xprint-suspension", "Show when code is suspended until macros are compiled.") val Xprompt: Setting[Boolean] = BooleanSetting("-Xprompt", "Display a prompt after each error (debugging option).") val XshowPhases: Setting[Boolean] = BooleanSetting("-Xshow-phases", "Print all compiler phases.") - val XreplLineWidth: Setting[Int] = IntSetting("-Xrepl-line-width", "Maximal number of columns per line for REPL output.", 390) val XreplDisableDisplay: Setting[Boolean] = BooleanSetting("-Xrepl-disable-display", "Do not display definitions in REPL.") val XfatalWarnings: Setting[Boolean] = BooleanSetting("-Xfatal-warnings", "Fail the compilation if there are any warnings.") val XverifySignatures: Setting[Boolean] = BooleanSetting("-Xverify-signatures", "Verify generic signatures in generated bytecode.") From e855eaae65544fb2fb0e7b2d93e9123f897cde08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Doeraene?= Date: Wed, 2 Dec 2020 13:48:00 +0100 Subject: [PATCH 2/7] Remove untested setting -Yoverride-vars and its effects. There is no test covering that setting, and Scala 2.13 does not have it either. --- compiler/src/dotty/tools/dotc/config/ScalaSettings.scala | 1 - compiler/src/dotty/tools/dotc/typer/RefChecks.scala | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala index 2e0589f593ab..caf2084f7172 100644 --- a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala +++ b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala @@ -137,7 +137,6 @@ class ScalaSettings extends Settings.SettingGroup with CommonScalaSettings { } /** -Y "Private" settings */ - val YoverrideVars: Setting[Boolean] = BooleanSetting("-Yoverride-vars", "Allow vars to be overridden.") val Yhelp: Setting[Boolean] = BooleanSetting("-Y", "Print a synopsis of private options.") val Ycheck: Setting[List[String]] = PhasesSetting("-Ycheck", "Check the tree at the end of") val YcheckMods: Setting[Boolean] = BooleanSetting("-Ycheck-mods", "Check that symbols and their defining trees have modifiers in sync.") diff --git a/compiler/src/dotty/tools/dotc/typer/RefChecks.scala b/compiler/src/dotty/tools/dotc/typer/RefChecks.scala index 3016cbaa18a8..46f6b18f7d37 100644 --- a/compiler/src/dotty/tools/dotc/typer/RefChecks.scala +++ b/compiler/src/dotty/tools/dotc/typer/RefChecks.scala @@ -413,12 +413,8 @@ object RefChecks { else if (other.is(AbsOverride) && other.isIncompleteIn(clazz) && !member.is(AbsOverride)) overrideError("needs `abstract override` modifiers") else if (member.is(Override) && other.is(Accessor) && - other.accessedFieldOrGetter.is(Mutable, butNot = Lazy)) { - // !?! this is not covered by the spec. We need to resolve this either by changing the spec or removing the test here. - // !!! is there a !?! convention? I'm !!!ing this to make sure it turns up on my searches. - if (!ctx.settings.YoverrideVars.value) - overrideError("cannot override a mutable variable") - } + other.accessedFieldOrGetter.is(Mutable, butNot = Lazy)) + overrideError("cannot override a mutable variable") else if (member.isAnyOverride && !(member.owner.thisType.baseClasses exists (_ isSubClass other.owner)) && !member.is(Deferred) && !other.is(Deferred) && From a6f69135c1069b237fb1f96500a5b18fc130c868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Doeraene?= Date: Fri, 4 Dec 2020 15:58:22 +0100 Subject: [PATCH 3/7] Remove the setting -Ytrace-context-creation. It doesn't do anything on its own, because the code that takes it into account is commented out. Since we have to uncomment it to enable it, there is no point in also having a setting. --- compiler/src/dotty/tools/dotc/config/ScalaSettings.scala | 1 - compiler/src/dotty/tools/dotc/core/Contexts.scala | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala index caf2084f7172..b25f26f0230e 100644 --- a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala +++ b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala @@ -163,7 +163,6 @@ class ScalaSettings extends Settings.SettingGroup with CommonScalaSettings { val Ydumpclasses: Setting[String] = StringSetting("-Ydump-classes", "dir", "Dump the generated bytecode to .class files (useful for reflective compilation that utilizes in-memory classloaders).", "") val YstopAfter: Setting[List[String]] = PhasesSetting("-Ystop-after", "Stop after") withAbbreviation ("-stop") // backward compat val YstopBefore: Setting[List[String]] = PhasesSetting("-Ystop-before", "Stop before") // stop before erasure as long as we have not debugged it fully - val YtraceContextCreation: Setting[Boolean] = BooleanSetting("-Ytrace-context-creation", "Store stack trace of context creations.") val YshowSuppressedErrors: Setting[Boolean] = BooleanSetting("-Yshow-suppressed-errors", "Also show follow-on errors and warnings that are normally suppressed.") val YdetailedStats: Setting[Boolean] = BooleanSetting("-Ydetailed-stats", "Show detailed internal compiler stats (needs Stats.enabled to be set to true).") val YkindProjector: Setting[Boolean] = BooleanSetting("-Ykind-projector", "Allow `*` as wildcard to be compatible with kind projector.") diff --git a/compiler/src/dotty/tools/dotc/core/Contexts.scala b/compiler/src/dotty/tools/dotc/core/Contexts.scala index fa0176856885..467cdafe1529 100644 --- a/compiler/src/dotty/tools/dotc/core/Contexts.scala +++ b/compiler/src/dotty/tools/dotc/core/Contexts.scala @@ -338,8 +338,7 @@ object Contexts { private var creationTrace: Array[StackTraceElement] = _ private def setCreationTrace() = - if (this.settings.YtraceContextCreation.value) - creationTrace = (new Throwable).getStackTrace().take(20) + creationTrace = (new Throwable).getStackTrace().take(20) /** Print all enclosing context's creation stacktraces */ def printCreationTraces() = { From 8f378531ef780ebb86118b922f39a36aa253cbcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Doeraene?= Date: Fri, 4 Dec 2020 16:10:15 +0100 Subject: [PATCH 4/7] Remove non implemented setting -Yshow-raw-tree. As well as the parameter in the `Settings` of staging, which were affecting the value of that setting (to no effect). --- compiler/src/dotty/tools/dotc/config/ScalaSettings.scala | 1 - staging/src/scala/quoted/staging/QuoteDriver.scala | 1 - staging/src/scala/quoted/staging/Toolbox.scala | 6 ++---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala index b25f26f0230e..3845eb4647a9 100644 --- a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala +++ b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala @@ -175,7 +175,6 @@ class ScalaSettings extends Settings.SettingGroup with CommonScalaSettings { val YprintDebug: Setting[Boolean] = BooleanSetting("-Yprint-debug", "When printing trees, print some extra information useful for debugging.") val YprintDebugOwners: Setting[Boolean] = BooleanSetting("-Yprint-debug-owners", "When printing trees, print owners of definitions.") val YshowPrintErrors: Setting[Boolean] = BooleanSetting("-Yshow-print-errors", "Don't suppress exceptions thrown during tree printing.") - val YshowRawQuoteTrees: Setting[Boolean] = BooleanSetting("-Yshow-raw-tree", "Don't remove quote artifacts.") val YtestPickler: Setting[Boolean] = BooleanSetting("-Ytest-pickler", "Self-test for pickling functionality; should be used with -Ystop-after:pickler.") val YparallelPickler: Setting[Boolean] = BooleanSetting("-Yparallel-pickler", "Run part of the pickling phase in parallel, disable because it breaks some tests.") val YcheckReentrant: Setting[Boolean] = BooleanSetting("-Ycheck-reentrant", "Check that compiled program does not contain vars that can be accessed from a global root.") diff --git a/staging/src/scala/quoted/staging/QuoteDriver.scala b/staging/src/scala/quoted/staging/QuoteDriver.scala index 505657fdbbb5..9bfb4dbdd287 100644 --- a/staging/src/scala/quoted/staging/QuoteDriver.scala +++ b/staging/src/scala/quoted/staging/QuoteDriver.scala @@ -60,7 +60,6 @@ private class QuoteDriver(appClassloader: ClassLoader) extends Driver: ictx private def setToolboxSettings(ctx: FreshContext, settings: Toolbox.Settings): ctx.type = - ctx.setSetting(ctx.settings.YshowRawQuoteTrees, settings.showRawTree) // An error in the generated code is a bug in the compiler // Setting the throwing reporter however will report any exception ctx.setReporter(new ThrowingReporter(ctx.reporter)) diff --git a/staging/src/scala/quoted/staging/Toolbox.scala b/staging/src/scala/quoted/staging/Toolbox.scala index e8fa611455c6..b3071c149557 100644 --- a/staging/src/scala/quoted/staging/Toolbox.scala +++ b/staging/src/scala/quoted/staging/Toolbox.scala @@ -44,7 +44,7 @@ object Toolbox: end new /** Setting of the Toolbox instance. */ - case class Settings private (outDir: Option[String], showRawTree: Boolean, compilerArgs: List[String]) + case class Settings private (outDir: Option[String], compilerArgs: List[String]) object Settings: @@ -52,15 +52,13 @@ object Toolbox: /** Make toolbox settings * @param outDir Output directory for the compiled quote. If set to None the output will be in memory - * @param showRawTree Do not remove quote tree artifacts * @param compilerArgs Compiler arguments. Use only if you know what you are doing. */ def make( // TODO avoid using default parameters (for binary compat) - showRawTree: Boolean = false, outDir: Option[String] = None, compilerArgs: List[String] = Nil ): Settings = - new Settings(outDir, showRawTree, compilerArgs) + new Settings(outDir, compilerArgs) end Settings From c0220ba460e4a5aad2cd1f09ab56779bd4015532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Doeraene?= Date: Fri, 4 Dec 2020 16:12:28 +0100 Subject: [PATCH 5/7] Remove the non implemented setting -Yparallel-pickler. --- compiler/src/dotty/tools/dotc/config/ScalaSettings.scala | 1 - 1 file changed, 1 deletion(-) diff --git a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala index 3845eb4647a9..0500036c3402 100644 --- a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala +++ b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala @@ -176,7 +176,6 @@ class ScalaSettings extends Settings.SettingGroup with CommonScalaSettings { val YprintDebugOwners: Setting[Boolean] = BooleanSetting("-Yprint-debug-owners", "When printing trees, print owners of definitions.") val YshowPrintErrors: Setting[Boolean] = BooleanSetting("-Yshow-print-errors", "Don't suppress exceptions thrown during tree printing.") val YtestPickler: Setting[Boolean] = BooleanSetting("-Ytest-pickler", "Self-test for pickling functionality; should be used with -Ystop-after:pickler.") - val YparallelPickler: Setting[Boolean] = BooleanSetting("-Yparallel-pickler", "Run part of the pickling phase in parallel, disable because it breaks some tests.") val YcheckReentrant: Setting[Boolean] = BooleanSetting("-Ycheck-reentrant", "Check that compiled program does not contain vars that can be accessed from a global root.") val YdropComments: Setting[Boolean] = BooleanSetting("-Ydrop-comments", "Drop comments when scanning source files.") val YcookComments: Setting[Boolean] = BooleanSetting("-Ycook-comments", "Cook the comments (type check `@usecase`, etc.)") From 5ef50a0effe536ac5ab18d73431c75a1a00e6cb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Doeraene?= Date: Fri, 4 Dec 2020 16:21:55 +0100 Subject: [PATCH 6/7] Fix the doc string of two settings. --- compiler/src/dotty/tools/dotc/config/ScalaSettings.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala index 0500036c3402..645ac2c38f36 100644 --- a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala +++ b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala @@ -22,7 +22,7 @@ trait CommonScalaSettings { self: Settings.SettingGroup => val classpath: Setting[String] = PathSetting("-classpath", "Specify where to find user class files.", defaultClasspath) withAbbreviation "-cp" withAbbreviation "--class-path" val outputDir: Setting[AbstractFile] = OutputSetting("-d", "directory|jar", "Destination for generated classfiles.", new PlainDirectory(Directory("."))) - val priorityclasspath: Setting[String] = PathSetting("-priorityclasspath", "Class path that takes precedence over all other paths (or testing only).", "") withAbbreviation "--priority-class-path" + val priorityclasspath: Setting[String] = PathSetting("-priorityclasspath", "Class path that takes precedence over all other paths (for testing only).", "") withAbbreviation "--priority-class-path" val color: Setting[String] = ChoiceSetting("-color", "mode", "Colored output", List("always", "never"/*, "auto"*/), "always"/* "auto"*/) withAbbreviation "--color" val verbose: Setting[Boolean] = BooleanSetting("-verbose", "Output messages about what the compiler is doing.") withAbbreviation "--verbose" val version: Setting[Boolean] = BooleanSetting("-version", "Print product version and exit.") withAbbreviation "--version" @@ -92,7 +92,7 @@ class ScalaSettings extends Settings.SettingGroup with CommonScalaSettings { val newSyntax: Setting[Boolean] = BooleanSetting("-new-syntax", "Require `then` and `do` in control expressions.") val oldSyntax: Setting[Boolean] = BooleanSetting("-old-syntax", "Require `(...)` around conditions.") - val indent: Setting[Boolean] = BooleanSetting("-indent", "Allow significant indentation.") + val indent: Setting[Boolean] = BooleanSetting("-indent", "Together with -rewrite, remove {...} syntax when possible due to significant indentation.") val noindent: Setting[Boolean] = BooleanSetting("-noindent", "Require classical {...} syntax, indentation is not significant.") val YindentColons: Setting[Boolean] = BooleanSetting("-Yindent-colons", "Allow colons at ends-of-lines to start indentation blocks.") From 4bc743e6a2d15709d358a8c9e2fb51a82331e780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Doeraene?= Date: Fri, 4 Dec 2020 16:31:28 +0100 Subject: [PATCH 7/7] Reclassify -Ysemanticdb as -Xsemanticdb, as it is officially supported. We keep -Ysemanticdb as an alias (an "abbreviation") so that we do not break all the existing tools that enable that setting. --- compiler/src/dotty/tools/dotc/Compiler.scala | 2 +- compiler/src/dotty/tools/dotc/config/ScalaSettings.scala | 2 +- .../src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala | 2 +- .../dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala | 2 +- compiler/test/dotty/tools/dotc/CompilationTests.scala | 2 +- compiler/test/dotty/tools/dotc/semanticdb/SemanticdbTests.scala | 2 +- compiler/test/dotty/tools/vulpix/TestConfiguration.scala | 2 +- docs/docs/contributing/testing.md | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/Compiler.scala b/compiler/src/dotty/tools/dotc/Compiler.scala index e42a5f091e9c..6dc8e33402a4 100644 --- a/compiler/src/dotty/tools/dotc/Compiler.scala +++ b/compiler/src/dotty/tools/dotc/Compiler.scala @@ -148,7 +148,7 @@ class Compiler { def newRun(using Context): Run = { reset() val rctx = - if ctx.settings.Ysemanticdb.value then + if ctx.settings.Xsemanticdb.value then ctx.addMode(Mode.ReadPositions) else ctx diff --git a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala index 645ac2c38f36..b2e5810be0c5 100644 --- a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala +++ b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala @@ -123,6 +123,7 @@ class ScalaSettings extends Settings.SettingGroup with CommonScalaSettings { val XverifySignatures: Setting[Boolean] = BooleanSetting("-Xverify-signatures", "Verify generic signatures in generated bytecode.") val XignoreScala2Macros: Setting[Boolean] = BooleanSetting("-Xignore-scala2-macros", "Ignore errors when compiling code that calls Scala2 macros, these will fail at runtime.") val XimportSuggestionTimeout: Setting[Int] = IntSetting("-Ximport-suggestion-timeout", "Timeout (in ms) for searching for import suggestions when errors are reported.", 8000) + val Xsemanticdb: Setting[Boolean] = BooleanSetting("-Xsemanticdb", "Store information in SemanticDB.").withAbbreviation("-Ysemanticdb") val XmixinForceForwarders = ChoiceSetting( name = "-Xmixin-force-forwarders", @@ -183,7 +184,6 @@ class ScalaSettings extends Settings.SettingGroup with CommonScalaSettings { val YdumpSbtInc: Setting[Boolean] = BooleanSetting("-Ydump-sbt-inc", "For every compiled foo.scala, output the API representation and dependencies used for sbt incremental compilation in foo.inc, implies -Yforce-sbt-phases.") val YcheckAllPatmat: Setting[Boolean] = BooleanSetting("-Ycheck-all-patmat", "Check exhaustivity and redundancy of all pattern matching (used for testing the algorithm).") val YretainTrees: Setting[Boolean] = BooleanSetting("-Yretain-trees", "Retain trees for top-level classes, accessible from ClassSymbol#tree") - val Ysemanticdb: Setting[Boolean] = BooleanSetting("-Ysemanticdb", "Store information in SemanticDB.") val YshowTreeIds: Setting[Boolean] = BooleanSetting("-Yshow-tree-ids", "Uniquely tag all tree nodes in debugging output.") val YfromTastyIgnoreList: Setting[List[String]] = MultiStringSetting("-Yfrom-tasty-ignore-list", "file", "List of `tasty` files in jar files that will not be loaded when using -from-tasty") diff --git a/compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala b/compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala index 22ed5dd23426..30edf5427e57 100644 --- a/compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala +++ b/compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala @@ -35,7 +35,7 @@ class ExtractSemanticDB extends Phase: override val phaseName: String = ExtractSemanticDB.name override def isRunnable(using Context) = - super.isRunnable && ctx.settings.Ysemanticdb.value + super.isRunnable && ctx.settings.Xsemanticdb.value // Check not needed since it does not transform trees override def isCheckable: Boolean = false diff --git a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala index 2cc464a1fe00..80dfa07fdfe9 100644 --- a/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala @@ -35,7 +35,7 @@ class BootstrappedOnlyCompilationTests extends ParallelTesting { aggregateTests( compileFilesInDir("tests/bench", defaultOptions), compileFilesInDir("tests/pos-macros", defaultOptions), - compileFilesInDir("tests/pos-custom-args/semanticdb", defaultOptions.and("-Ysemanticdb")), + compileFilesInDir("tests/pos-custom-args/semanticdb", defaultOptions.and("-Xsemanticdb")), ).checkCompile() } diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index a1c68e5c76c0..7ecb6be11e6b 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -232,7 +232,7 @@ class CompilationTests { Properties.compilerInterface, Properties.scalaLibrary, Properties.scalaAsm, Properties.dottyInterfaces, Properties.jlineTerminal, Properties.jlineReader, ).mkString(File.pathSeparator), - Array("-Ycheck-reentrant", "-language:postfixOps", "-Ysemanticdb") + Array("-Ycheck-reentrant", "-language:postfixOps", "-Xsemanticdb") ) val libraryDirs = List(Paths.get("library/src"), Paths.get("library/src-bootstrapped")) diff --git a/compiler/test/dotty/tools/dotc/semanticdb/SemanticdbTests.scala b/compiler/test/dotty/tools/dotc/semanticdb/SemanticdbTests.scala index 1f7785653fa6..5deeaed114a8 100644 --- a/compiler/test/dotty/tools/dotc/semanticdb/SemanticdbTests.scala +++ b/compiler/test/dotty/tools/dotc/semanticdb/SemanticdbTests.scala @@ -107,7 +107,7 @@ class SemanticdbTests: val exitJava = javac.run(null, null, null, javaArgs:_*) assert(exitJava == 0, "java compiler has errors") val args = Array( - "-Ysemanticdb", + "-Xsemanticdb", "-d", target.toString, "-feature", "-deprecation", diff --git a/compiler/test/dotty/tools/vulpix/TestConfiguration.scala b/compiler/test/dotty/tools/vulpix/TestConfiguration.scala index e4348e198941..b73c3756fd89 100644 --- a/compiler/test/dotty/tools/vulpix/TestConfiguration.scala +++ b/compiler/test/dotty/tools/vulpix/TestConfiguration.scala @@ -17,7 +17,7 @@ object TestConfiguration { "-Yno-deep-subtypes", "-Yno-double-bindings", "-Yforce-sbt-phases", - "-Ysemanticdb", + "-Xsemanticdb", "-Xverify-signatures" ) diff --git a/docs/docs/contributing/testing.md b/docs/docs/contributing/testing.md index 7b1cb58fa4bc..c0fdca5f10dc 100644 --- a/docs/docs/contributing/testing.md +++ b/docs/docs/contributing/testing.md @@ -148,7 +148,7 @@ with `with-compiler` in their name. ### SemanticDB tests -The output of the `extractSemanticDB` phase, enabled with `-Ysemanticdb` is tested with the bootstrapped JUnit test +The output of the `extractSemanticDB` phase, enabled with `-Xsemanticdb` is tested with the bootstrapped JUnit test `dotty.tools.dotc.semanticdb.SemanticdbTests`. It uses source files in `tests/semanticdb/expect` to generate two kinds of output file that are compared with "expect files": placement of semanticdb symbol occurrences inline in sourcecode (`*.expect.scala`), for human verification by inspection; and secondly metap formatted output which outputs