Skip to content

Remove settings that fork the binary ecosystem #10721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions compiler/src/dotty/tools/dotc/config/ScalaSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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 XnoValueClasses: Setting[Boolean] = BooleanSetting("-Xno-value-classes", "Do not use value classes. Helps debugging.")
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.")
Expand Down Expand Up @@ -161,7 +160,6 @@ class ScalaSettings extends Settings.SettingGroup with CommonScalaSettings {
val Yscala2Unpickler: Setting[String] = StringSetting("-Yscala2-unpickler", "", "Control where we may get Scala 2 symbols from. This is either \"always\", \"never\", or a classpath.", "always")

val YnoImports: Setting[Boolean] = BooleanSetting("-Yno-imports", "Compile without importing scala.*, java.lang.*, or Predef.")
val YnoInline: Setting[Boolean] = BooleanSetting("-Yno-inline", "Suppress inlining.")
val YnoGenericSig: Setting[Boolean] = BooleanSetting("-Yno-generic-signatures", "Suppress generation of generic signatures for Java.")
val YnoPredef: Setting[Boolean] = BooleanSetting("-Yno-predef", "Compile without importing Predef.")
val Yskip: Setting[List[String]] = PhasesSetting("-Yskip", "Skip")
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/transform/Memoize.scala
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class Memoize extends MiniPhase with IdentityDenotTransformer { thisPhase =>
cpy.installAfter(thisPhase)
}

val NoFieldNeeded = Lazy | Deferred | JavaDefined | (if (ctx.settings.YnoInline.value) EmptyFlags else Inline)
val NoFieldNeeded = Lazy | Deferred | JavaDefined | Inline

def erasedBottomTree(sym: Symbol) =
if (sym eq defn.NothingClass) Throw(nullLiteral)
Expand Down
1 change: 0 additions & 1 deletion compiler/src/dotty/tools/dotc/transform/ValueClasses.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ object ValueClasses {

def isDerivedValueClass(sym: Symbol)(using Context): Boolean = {
val d = sym.denot
!ctx.settings.XnoValueClasses.value &&
!d.isRefinementClass &&
d.isValueClass &&
(d.initial.symbol ne defn.AnyValClass) && // Compare the initial symbol because AnyVal does not exist after erasure
Expand Down
4 changes: 1 addition & 3 deletions compiler/src/dotty/tools/dotc/typer/Typer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3283,9 +3283,7 @@ class Typer extends Namer
}
else if (methPart(tree).symbol.isAllOf(Inline | Deferred) && !Inliner.inInlineMethod) then
errorTree(tree, i"Deferred inline ${methPart(tree).symbol.showLocated} cannot be invoked")
else if (Inliner.isInlineable(tree) &&
!ctx.settings.YnoInline.value &&
!suppressInline) {
else if (Inliner.isInlineable(tree) && !suppressInline) {
tree.tpe <:< wildApprox(pt)
val errorCount = ctx.reporter.errorCount
val meth = methPart(tree).symbol
Expand Down
1 change: 0 additions & 1 deletion doc-tool/src/dotty/tools/dottydoc/DocDriver.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class DocDriver extends Driver {

ctx.setSettings(summary.sstate)
ctx.setSetting(ctx.settings.YcookComments, true)
ctx.setSetting(ctx.settings.YnoInline, true)
ctx.setProperty(ContextDoc, new ContextDottydoc)

val fileNames = CompilerCommand.checkUsage(summary, sourcesRequired)(using ctx)
Expand Down
1 change: 0 additions & 1 deletion doc-tool/test/dotty/tools/dottydoc/DottyDocTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ trait DottyDocTest extends MessageRendering {
ctx.setSetting(ctx.settings.language, List("Scala2"))
ctx.setSetting(ctx.settings.YcookComments, true)
ctx.setSetting(ctx.settings.Ycheck, "all" :: Nil)
ctx.setSetting(ctx.settings.YnoInline, true)
ctx.setSetting(ctx.settings.wikiSyntax, true)
ctx.setProperty(ContextDoc, new ContextDottydoc)
ctx.setSetting(
Expand Down
1 change: 0 additions & 1 deletion doc-tool/test/dotty/tools/dottydoc/MarkdownTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class MarkdownTests extends DottyDocTest with CheckFromSource {
val ctx = base.initialCtx.fresh
ctx.setSetting(ctx.settings.language, List("Scala2"))
ctx.setSetting(ctx.settings.YcookComments, true)
ctx.setSetting(ctx.settings.YnoInline, true)
ctx.setSetting(ctx.settings.Ycheck, "all" :: Nil)
// No wiki syntax!
ctx.setSetting(ctx.settings.wikiSyntax, false)
Expand Down