Skip to content

Commit eab8783

Browse files
authored
Merge pull request scala#10721 from dotty-staging/remove-language-forking-settings
Remove settings that fork the binary ecosystem
2 parents d8a1451 + 6e7f141 commit eab8783

File tree

7 files changed

+2
-10
lines changed

7 files changed

+2
-10
lines changed

compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ class ScalaSettings extends Settings.SettingGroup with CommonScalaSettings {
118118
val XprintSuspension: Setting[Boolean] = BooleanSetting("-Xprint-suspension", "Show when code is suspended until macros are compiled.")
119119
val Xprompt: Setting[Boolean] = BooleanSetting("-Xprompt", "Display a prompt after each error (debugging option).")
120120
val XshowPhases: Setting[Boolean] = BooleanSetting("-Xshow-phases", "Print all compiler phases.")
121-
val XnoValueClasses: Setting[Boolean] = BooleanSetting("-Xno-value-classes", "Do not use value classes. Helps debugging.")
122121
val XreplLineWidth: Setting[Int] = IntSetting("-Xrepl-line-width", "Maximal number of columns per line for REPL output.", 390)
123122
val XreplDisableDisplay: Setting[Boolean] = BooleanSetting("-Xrepl-disable-display", "Do not display definitions in REPL.")
124123
val XfatalWarnings: Setting[Boolean] = BooleanSetting("-Xfatal-warnings", "Fail the compilation if there are any warnings.")
@@ -161,7 +160,6 @@ class ScalaSettings extends Settings.SettingGroup with CommonScalaSettings {
161160
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")
162161

163162
val YnoImports: Setting[Boolean] = BooleanSetting("-Yno-imports", "Compile without importing scala.*, java.lang.*, or Predef.")
164-
val YnoInline: Setting[Boolean] = BooleanSetting("-Yno-inline", "Suppress inlining.")
165163
val YnoGenericSig: Setting[Boolean] = BooleanSetting("-Yno-generic-signatures", "Suppress generation of generic signatures for Java.")
166164
val YnoPredef: Setting[Boolean] = BooleanSetting("-Yno-predef", "Compile without importing Predef.")
167165
val Yskip: Setting[List[String]] = PhasesSetting("-Yskip", "Skip")

compiler/src/dotty/tools/dotc/transform/Memoize.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class Memoize extends MiniPhase with IdentityDenotTransformer { thisPhase =>
129129
cpy.installAfter(thisPhase)
130130
}
131131

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

134134
def erasedBottomTree(sym: Symbol) =
135135
if (sym eq defn.NothingClass) Throw(nullLiteral)

compiler/src/dotty/tools/dotc/transform/ValueClasses.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ object ValueClasses {
1515

1616
def isDerivedValueClass(sym: Symbol)(using Context): Boolean = {
1717
val d = sym.denot
18-
!ctx.settings.XnoValueClasses.value &&
1918
!d.isRefinementClass &&
2019
d.isValueClass &&
2120
(d.initial.symbol ne defn.AnyValClass) && // Compare the initial symbol because AnyVal does not exist after erasure

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3283,9 +3283,7 @@ class Typer extends Namer
32833283
}
32843284
else if (methPart(tree).symbol.isAllOf(Inline | Deferred) && !Inliner.inInlineMethod) then
32853285
errorTree(tree, i"Deferred inline ${methPart(tree).symbol.showLocated} cannot be invoked")
3286-
else if (Inliner.isInlineable(tree) &&
3287-
!ctx.settings.YnoInline.value &&
3288-
!suppressInline) {
3286+
else if (Inliner.isInlineable(tree) && !suppressInline) {
32893287
tree.tpe <:< wildApprox(pt)
32903288
val errorCount = ctx.reporter.errorCount
32913289
val meth = methPart(tree).symbol

doc-tool/src/dotty/tools/dottydoc/DocDriver.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ class DocDriver extends Driver {
2626

2727
ctx.setSettings(summary.sstate)
2828
ctx.setSetting(ctx.settings.YcookComments, true)
29-
ctx.setSetting(ctx.settings.YnoInline, true)
3029
ctx.setProperty(ContextDoc, new ContextDottydoc)
3130

3231
val fileNames = CompilerCommand.checkUsage(summary, sourcesRequired)(using ctx)

doc-tool/test/dotty/tools/dottydoc/DottyDocTest.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ trait DottyDocTest extends MessageRendering {
3232
ctx.setSetting(ctx.settings.language, List("Scala2"))
3333
ctx.setSetting(ctx.settings.YcookComments, true)
3434
ctx.setSetting(ctx.settings.Ycheck, "all" :: Nil)
35-
ctx.setSetting(ctx.settings.YnoInline, true)
3635
ctx.setSetting(ctx.settings.wikiSyntax, true)
3736
ctx.setProperty(ContextDoc, new ContextDottydoc)
3837
ctx.setSetting(

doc-tool/test/dotty/tools/dottydoc/MarkdownTests.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ class MarkdownTests extends DottyDocTest with CheckFromSource {
1818
val ctx = base.initialCtx.fresh
1919
ctx.setSetting(ctx.settings.language, List("Scala2"))
2020
ctx.setSetting(ctx.settings.YcookComments, true)
21-
ctx.setSetting(ctx.settings.YnoInline, true)
2221
ctx.setSetting(ctx.settings.Ycheck, "all" :: Nil)
2322
// No wiki syntax!
2423
ctx.setSetting(ctx.settings.wikiSyntax, false)

0 commit comments

Comments
 (0)