From f6345c6202b69a4603cb61ca029d60aa2ac80599 Mon Sep 17 00:00:00 2001 From: noti0na1 <8036790+noti0na1@users.noreply.github.com> Date: Mon, 22 Apr 2024 13:54:13 +0000 Subject: [PATCH 1/7] Enhance help message for language flag --- compiler/src/dotty/tools/dotc/config/CliCommand.scala | 7 +++++-- .../src/dotty/tools/dotc/config/CompilerCommand.scala | 2 +- compiler/src/dotty/tools/dotc/config/Feature.scala | 9 +++++++++ compiler/src/dotty/tools/dotc/config/ScalaSettings.scala | 2 +- .../tools/dotc/config/ScalaSettingsProperties.scala | 3 +++ compiler/src/dotty/tools/dotc/config/Settings.scala | 2 +- compiler/src/dotty/tools/dotc/core/StdNames.scala | 1 + 7 files changed, 21 insertions(+), 5 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/config/CliCommand.scala b/compiler/src/dotty/tools/dotc/config/CliCommand.scala index 5ac6b772df95..b0046ee49cd1 100644 --- a/compiler/src/dotty/tools/dotc/config/CliCommand.scala +++ b/compiler/src/dotty/tools/dotc/config/CliCommand.scala @@ -53,7 +53,7 @@ trait CliCommand: end distill /** Creates a help message for a subset of options based on cond */ - protected def availableOptionsMsg(p: Setting[?] => Boolean)(using settings: ConcreteSettings)(using SettingsState): String = + protected def availableOptionsMsg(p: Setting[?] => Boolean, showArgFileMsg: Boolean = true)(using settings: ConcreteSettings)(using SettingsState): String = // result is (Option Name, descrption\ndefault: value\nchoices: x, y, z def help(s: Setting[?]): (String, String) = // For now, skip the default values that do not make sense for the end user, such as 'false' for the version command. @@ -68,7 +68,10 @@ trait CliCommand: val ss = settings.allSettings.filter(p).toList.sortBy(_.name) val formatter = Columnator("", "", maxField = 30) val fresh = ContextBase().initialCtx.fresh.setSettings(summon[SettingsState]) - formatter(List(ss.map(help) :+ ("@", "A text file containing compiler arguments (options and source files).")))(using fresh) + var msg = ss.map(help) + if showArgFileMsg then + msg = msg :+ ("@", "A text file containing compiler arguments (options and source files).") + formatter(List(msg))(using fresh) end availableOptionsMsg protected def shortUsage: String = s"Usage: $cmdName " diff --git a/compiler/src/dotty/tools/dotc/config/CompilerCommand.scala b/compiler/src/dotty/tools/dotc/config/CompilerCommand.scala index 587f94dad7b3..43f3ed63f969 100644 --- a/compiler/src/dotty/tools/dotc/config/CompilerCommand.scala +++ b/compiler/src/dotty/tools/dotc/config/CompilerCommand.scala @@ -9,7 +9,7 @@ abstract class CompilerCommand extends CliCommand: final def helpMsg(using settings: ConcreteSettings)(using SettingsState, Context): String = settings.allSettings.find(isHelping) match - case Some(s) => s.description + case Some(s) => availableOptionsMsg(_ == s, showArgFileMsg = false) case _ => if (settings.help.value) usageMessage else if (settings.Vhelp.value) vusageMessage diff --git a/compiler/src/dotty/tools/dotc/config/Feature.scala b/compiler/src/dotty/tools/dotc/config/Feature.scala index 0d551094da4d..0538c421813c 100644 --- a/compiler/src/dotty/tools/dotc/config/Feature.scala +++ b/compiler/src/dotty/tools/dotc/config/Feature.scala @@ -41,6 +41,15 @@ object Feature: defn.languageExperimentalFeatures .map(sym => experimental(sym.name)) .filterNot(_ == captureChecking) // TODO is this correct? + + val values = List( + nme.help, + nme.noAutoTupling, nme.dynamics, nme.unsafeNulls, nme.postfixOps, nme.strictEquality, + nme.implicitConversions, nme.adhocExtensions, + namedTypeArguments, genericNumberLiterals, scala2macros, + dependent, erasedDefinitions, symbolLiterals, fewerBraces, saferExceptions, + clauseInterleaving, pureFunctions, captureChecking, into + ) /** Is `feature` enabled by by a command-line setting? The enabling setting is * diff --git a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala index 86b657ddf00d..15cfb31489f7 100644 --- a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala +++ b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala @@ -114,7 +114,7 @@ trait CommonScalaSettings: val explainTypes: Setting[Boolean] = BooleanSetting(RootSetting, "explain-types", "Explain type errors in more detail (deprecated, use -explain instead).", aliases = List("--explain-types", "-explaintypes")) val explainCyclic: Setting[Boolean] = BooleanSetting(RootSetting, "explain-cyclic", "Explain cyclic reference errors in more detail.", aliases = List("--explain-cyclic")) val unchecked: Setting[Boolean] = BooleanSetting(RootSetting, "unchecked", "Enable additional warnings where generated code depends on assumptions.", initialValue = true, aliases = List("--unchecked")) - val language: Setting[List[String]] = MultiStringSetting(RootSetting, "language", "feature", "Enable one or more language features.", aliases = List("--language")) + val language: Setting[List[String]] = MultiChoiceSetting(RootSetting, "language", "feature", "Enable one or more language features.", choices = ScalaSettingsProperties.supportedLanguageFeatures, aliases = List("--language")) val experimental: Setting[Boolean] = BooleanSetting(RootSetting, "experimental", "Annotate all top-level definitions with @experimental. This enables the use of experimental features anywhere in the project.") /* Coverage settings */ diff --git a/compiler/src/dotty/tools/dotc/config/ScalaSettingsProperties.scala b/compiler/src/dotty/tools/dotc/config/ScalaSettingsProperties.scala index e8a55dc6e737..95c6237bcae3 100644 --- a/compiler/src/dotty/tools/dotc/config/ScalaSettingsProperties.scala +++ b/compiler/src/dotty/tools/dotc/config/ScalaSettingsProperties.scala @@ -26,6 +26,9 @@ object ScalaSettingsProperties: def supportedSourceVersions: List[String] = SourceVersion.values.toList.map(_.toString) + def supportedLanguageFeatures: List[String] = + Feature.values.toList.map(_.toString) + def defaultClasspath: String = sys.env.getOrElse("CLASSPATH", ".") def defaultPageWidth: Int = { diff --git a/compiler/src/dotty/tools/dotc/config/Settings.scala b/compiler/src/dotty/tools/dotc/config/Settings.scala index 1e2ced4d65a7..5042737c30cb 100644 --- a/compiler/src/dotty/tools/dotc/config/Settings.scala +++ b/compiler/src/dotty/tools/dotc/config/Settings.scala @@ -380,7 +380,7 @@ object Settings: def ChoiceSetting(category: SettingCategory, name: String, helpArg: String, descr: String, choices: List[String], default: String, aliases: List[String] = Nil, legacyArgs: Boolean = false, deprecation: Option[Deprecation] = None): Setting[String] = publish(Setting(category, prependName(name), descr, default, helpArg, Some(choices), aliases = aliases, legacyArgs = legacyArgs, deprecation = deprecation)) - def MultiChoiceSetting(category: SettingCategory, name: String, helpArg: String, descr: String, choices: List[String], default: List[String], aliases: List[String] = Nil, deprecation: Option[Deprecation] = None): Setting[List[String]] = + def MultiChoiceSetting(category: SettingCategory, name: String, helpArg: String, descr: String, choices: List[String], default: List[String] = Nil, aliases: List[String] = Nil, deprecation: Option[Deprecation] = None): Setting[List[String]] = publish(Setting(category, prependName(name), descr, default, helpArg, Some(choices), aliases = aliases, deprecation = deprecation)) def MultiChoiceHelpSetting(category: SettingCategory, name: String, helpArg: String, descr: String, choices: List[ChoiceWithHelp[String]], default: List[ChoiceWithHelp[String]], aliases: List[String] = Nil, deprecation: Option[Deprecation] = None): Setting[List[ChoiceWithHelp[String]]] = diff --git a/compiler/src/dotty/tools/dotc/core/StdNames.scala b/compiler/src/dotty/tools/dotc/core/StdNames.scala index b935488695e0..3753d1688399 100644 --- a/compiler/src/dotty/tools/dotc/core/StdNames.scala +++ b/compiler/src/dotty/tools/dotc/core/StdNames.scala @@ -509,6 +509,7 @@ object StdNames { val _hashCode_ : N = "_hashCode" val hash_ : N = "hash" val head: N = "head" + val help: N = "help" val higherKinds: N = "higherKinds" val idx: N = "idx" val identity: N = "identity" From e3a5f153e7ba88a3d4b384241622b3a2cc312ab0 Mon Sep 17 00:00:00 2001 From: noti0na1 Date: Tue, 23 Apr 2024 14:32:20 +0200 Subject: [PATCH 2/7] Add help to choices --- .../src/dotty/tools/dotc/config/Feature.scala | 34 ++++++++++++++----- .../tools/dotc/config/ScalaSettings.scala | 3 +- .../dotc/config/ScalaSettingsProperties.scala | 5 +-- 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/config/Feature.scala b/compiler/src/dotty/tools/dotc/config/Feature.scala index 0538c421813c..02dd40b3516a 100644 --- a/compiler/src/dotty/tools/dotc/config/Feature.scala +++ b/compiler/src/dotty/tools/dotc/config/Feature.scala @@ -11,6 +11,7 @@ import SourceVersion.* import reporting.Message import NameKinds.QualifiedName import Annotations.ExperimentalAnnotation +import Settings.Setting.ChoiceWithHelp object Feature: @@ -41,16 +42,33 @@ object Feature: defn.languageExperimentalFeatures .map(sym => experimental(sym.name)) .filterNot(_ == captureChecking) // TODO is this correct? - + val values = List( - nme.help, - nme.noAutoTupling, nme.dynamics, nme.unsafeNulls, nme.postfixOps, nme.strictEquality, - nme.implicitConversions, nme.adhocExtensions, - namedTypeArguments, genericNumberLiterals, scala2macros, - dependent, erasedDefinitions, symbolLiterals, fewerBraces, saferExceptions, - clauseInterleaving, pureFunctions, captureChecking, into + (nme.help, "Display all available features"), + (nme.noAutoTupling, "Disable automatic tupling"), + (nme.dynamics, "Allow direct or indirect subclasses of scala.Dynamic"), + (nme.unsafeNulls, "Enable unsafe nulls for explicit nulls"), + (nme.postfixOps, "Allow postfix operator notation"), + (nme.strictEquality, "Enable strict equality (=== and !==)"), + (nme.implicitConversions, "Allow implicit conversions without warnings"), + (nme.adhocExtensions, "Allow ad-hoc extension methods"), + (namedTypeArguments, "Allow named type arguments"), + (genericNumberLiterals, "Allow generic number literals"), + (scala2macros, "Allow Scala 2 macros"), + (dependent, "Allow dependent method types"), + (erasedDefinitions, "Allow erased definitions"), + (symbolLiterals, "Allow symbol literals"), + (fewerBraces, "Allow fewer braces"), + (saferExceptions, "Enable safer exceptions"), + (clauseInterleaving, "Enable clause interleaving"), + (pureFunctions, "Enable pure functions"), + (captureChecking, "Enable experimental capture checking"), + (into, "Allow into clauses in pattern matches") ) + private def enabledLanguageFeaturesBySetting(using Context): List[String] = + ctx.settings.language.value.asInstanceOf + /** Is `feature` enabled by by a command-line setting? The enabling setting is * * -language:feature @@ -59,7 +77,7 @@ object Feature: * but subtracting the prefix `scala.language.` at the front. */ def enabledBySetting(feature: TermName)(using Context): Boolean = - ctx.base.settings.language.value.contains(feature.toString) + enabledLanguageFeaturesBySetting.contains(feature.toString) /** Is `feature` enabled by by an import? This is the case if the feature * is imported by a named import diff --git a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala index 15cfb31489f7..bb28e06150fe 100644 --- a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala +++ b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala @@ -114,7 +114,7 @@ trait CommonScalaSettings: val explainTypes: Setting[Boolean] = BooleanSetting(RootSetting, "explain-types", "Explain type errors in more detail (deprecated, use -explain instead).", aliases = List("--explain-types", "-explaintypes")) val explainCyclic: Setting[Boolean] = BooleanSetting(RootSetting, "explain-cyclic", "Explain cyclic reference errors in more detail.", aliases = List("--explain-cyclic")) val unchecked: Setting[Boolean] = BooleanSetting(RootSetting, "unchecked", "Enable additional warnings where generated code depends on assumptions.", initialValue = true, aliases = List("--unchecked")) - val language: Setting[List[String]] = MultiChoiceSetting(RootSetting, "language", "feature", "Enable one or more language features.", choices = ScalaSettingsProperties.supportedLanguageFeatures, aliases = List("--language")) + val language: Setting[List[ChoiceWithHelp[String]]] = MultiChoiceHelpSetting(RootSetting, "language", "feature", "Enable one or more language features.", choices = ScalaSettingsProperties.supportedLanguageFeatures, default = Nil, aliases = List("--language")) val experimental: Setting[Boolean] = BooleanSetting(RootSetting, "experimental", "Annotate all top-level definitions with @experimental. This enables the use of experimental features anywhere in the project.") /* Coverage settings */ @@ -492,3 +492,4 @@ private sealed trait YSettings: @deprecated(message = "Scheduled for removal.", since = "3.5.0") val YoutputOnlyTasty: Setting[Boolean] = BooleanSetting(ForkSetting, "Youtput-only-tasty", "Used to only generate the TASTy file without the classfiles", deprecation = Deprecation.removed()) end YSettings + diff --git a/compiler/src/dotty/tools/dotc/config/ScalaSettingsProperties.scala b/compiler/src/dotty/tools/dotc/config/ScalaSettingsProperties.scala index 95c6237bcae3..a839d3e3be19 100644 --- a/compiler/src/dotty/tools/dotc/config/ScalaSettingsProperties.scala +++ b/compiler/src/dotty/tools/dotc/config/ScalaSettingsProperties.scala @@ -1,6 +1,7 @@ package dotty.tools.dotc package config +import Settings.Setting.ChoiceWithHelp import dotty.tools.backend.jvm.BackendUtils.classfileVersionMap import dotty.tools.io.{AbstractFile, Directory, JDK9Reflectors, PlainDirectory, NoAbstractFile} import scala.language.unsafeNulls @@ -26,8 +27,8 @@ object ScalaSettingsProperties: def supportedSourceVersions: List[String] = SourceVersion.values.toList.map(_.toString) - def supportedLanguageFeatures: List[String] = - Feature.values.toList.map(_.toString) + def supportedLanguageFeatures: List[ChoiceWithHelp[String]] = + Feature.values.map((n, d) => ChoiceWithHelp(n.toString, d)) def defaultClasspath: String = sys.env.getOrElse("CLASSPATH", ".") From 20ab4aa1824156a1ca51eb98fe2a07443e450fe3 Mon Sep 17 00:00:00 2001 From: noti0na1 Date: Tue, 23 Apr 2024 16:57:40 +0200 Subject: [PATCH 3/7] Fix tests --- community-build/community-projects/scala-xml | 2 +- compiler/test/dotty/tools/DottyTest.scala | 2 +- compiler/test/dotty/tools/dotc/CompilationTests.scala | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/community-build/community-projects/scala-xml b/community-build/community-projects/scala-xml index 105c3dac8835..0605c07e298c 160000 --- a/community-build/community-projects/scala-xml +++ b/community-build/community-projects/scala-xml @@ -1 +1 @@ -Subproject commit 105c3dac883549eca1182b04fc5a18fe4f5ad51a +Subproject commit 0605c07e298c1bd8758f79d3c790f89db986a6bc diff --git a/compiler/test/dotty/tools/DottyTest.scala b/compiler/test/dotty/tools/DottyTest.scala index 7ccbc09a4c92..2b94801b67d7 100644 --- a/compiler/test/dotty/tools/DottyTest.scala +++ b/compiler/test/dotty/tools/DottyTest.scala @@ -40,7 +40,7 @@ trait DottyTest extends ContextEscapeDetection { protected def initializeCtx(fc: FreshContext): Unit = { fc.setSetting(fc.settings.encoding, "UTF8") fc.setSetting(fc.settings.classpath, TestConfiguration.basicClasspath) - fc.setSetting(fc.settings.language, List("experimental.erasedDefinitions")) + fc.setSetting(fc.settings.language, List("experimental.erasedDefinitions").asInstanceOf) fc.setProperty(ContextDoc, new ContextDocstrings) } diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index de3bd02bba6e..2b9ebd2c69d1 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -143,7 +143,7 @@ class CompilationTests { "tests/neg-custom-args/toplevel-samesource/S.scala", "tests/neg-custom-args/toplevel-samesource/nested/S.scala"), defaultOptions), - compileFile("tests/neg/i7575.scala", defaultOptions.withoutLanguageFeatures.and("-language:_")), + compileFile("tests/neg/i7575.scala", defaultOptions.withoutLanguageFeatures), ).checkExpectedErrors() } From d5f1695e01278b673fe6e3cba270f8fd57237f19 Mon Sep 17 00:00:00 2001 From: noti0na1 Date: Thu, 2 May 2024 19:24:22 +0200 Subject: [PATCH 4/7] Update some helps --- compiler/src/dotty/tools/dotc/config/Feature.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/config/Feature.scala b/compiler/src/dotty/tools/dotc/config/Feature.scala index 02dd40b3516a..6c51d0812eb6 100644 --- a/compiler/src/dotty/tools/dotc/config/Feature.scala +++ b/compiler/src/dotty/tools/dotc/config/Feature.scala @@ -49,7 +49,7 @@ object Feature: (nme.dynamics, "Allow direct or indirect subclasses of scala.Dynamic"), (nme.unsafeNulls, "Enable unsafe nulls for explicit nulls"), (nme.postfixOps, "Allow postfix operator notation"), - (nme.strictEquality, "Enable strict equality (=== and !==)"), + (nme.strictEquality, "Enable strict equality (disable canEqualAny)"), (nme.implicitConversions, "Allow implicit conversions without warnings"), (nme.adhocExtensions, "Allow ad-hoc extension methods"), (namedTypeArguments, "Allow named type arguments"), @@ -58,10 +58,10 @@ object Feature: (dependent, "Allow dependent method types"), (erasedDefinitions, "Allow erased definitions"), (symbolLiterals, "Allow symbol literals"), - (fewerBraces, "Allow fewer braces"), + (fewerBraces, "Enable support for using indentation for arguments"), (saferExceptions, "Enable safer exceptions"), (clauseInterleaving, "Enable clause interleaving"), - (pureFunctions, "Enable pure functions"), + (pureFunctions, "Enable pure functions for capture checking"), (captureChecking, "Enable experimental capture checking"), (into, "Allow into clauses in pattern matches") ) From 326408188d073d79aabb0320cea99290196ed5ce Mon Sep 17 00:00:00 2001 From: noti0na1 Date: Fri, 3 May 2024 15:45:11 +0200 Subject: [PATCH 5/7] Update community projects --- community-build/community-projects/izumi-reflect | 2 +- community-build/community-projects/parboiled2 | 2 +- community-build/community-projects/scala-collection-compat | 2 +- compiler/src/dotty/tools/dotc/config/Feature.scala | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/community-build/community-projects/izumi-reflect b/community-build/community-projects/izumi-reflect index c0756faa7311..bd4ae213f81e 160000 --- a/community-build/community-projects/izumi-reflect +++ b/community-build/community-projects/izumi-reflect @@ -1 +1 @@ -Subproject commit c0756faa7311f70c6da6af29b8cb25506634bf09 +Subproject commit bd4ae213f81e63c330b22cf5f73f68641814b195 diff --git a/community-build/community-projects/parboiled2 b/community-build/community-projects/parboiled2 index 628127744bde..3fb32f833f8c 160000 --- a/community-build/community-projects/parboiled2 +++ b/community-build/community-projects/parboiled2 @@ -1 +1 @@ -Subproject commit 628127744bde8dc2e01432badd68886a5f722f71 +Subproject commit 3fb32f833f8c6a2fca25474c189efd91ffb65557 diff --git a/community-build/community-projects/scala-collection-compat b/community-build/community-projects/scala-collection-compat index b39b4b64732d..2bf3fea914b2 160000 --- a/community-build/community-projects/scala-collection-compat +++ b/community-build/community-projects/scala-collection-compat @@ -1 +1 @@ -Subproject commit b39b4b64732d9dd5e0f065e4180f656237ac4444 +Subproject commit 2bf3fea914b2f13e4805b3e7b519bdf0e595e4c9 diff --git a/compiler/src/dotty/tools/dotc/config/Feature.scala b/compiler/src/dotty/tools/dotc/config/Feature.scala index 6c51d0812eb6..f5fa383c5636 100644 --- a/compiler/src/dotty/tools/dotc/config/Feature.scala +++ b/compiler/src/dotty/tools/dotc/config/Feature.scala @@ -48,7 +48,7 @@ object Feature: (nme.noAutoTupling, "Disable automatic tupling"), (nme.dynamics, "Allow direct or indirect subclasses of scala.Dynamic"), (nme.unsafeNulls, "Enable unsafe nulls for explicit nulls"), - (nme.postfixOps, "Allow postfix operator notation"), + (nme.postfixOps, "Allow postfix operators (not recommended)"), (nme.strictEquality, "Enable strict equality (disable canEqualAny)"), (nme.implicitConversions, "Allow implicit conversions without warnings"), (nme.adhocExtensions, "Allow ad-hoc extension methods"), From b7fc5da279948259acc0e9b933c79788c1710981 Mon Sep 17 00:00:00 2001 From: noti0na1 Date: Mon, 6 May 2024 14:06:37 +0200 Subject: [PATCH 6/7] Update remaining comminity projects --- community-build/community-projects/Monocle | 2 +- community-build/community-projects/akka | 2 +- community-build/community-projects/endpoints4s | 2 +- community-build/community-projects/scalaz | 2 +- compiler/src/dotty/tools/dotc/config/Feature.scala | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/community-build/community-projects/Monocle b/community-build/community-projects/Monocle index a0e70744e9b3..a9a12a13a48c 160000 --- a/community-build/community-projects/Monocle +++ b/community-build/community-projects/Monocle @@ -1 +1 @@ -Subproject commit a0e70744e9b3bfb0f12e4ea292151c49c3302cd1 +Subproject commit a9a12a13a48c957535ddd6850ed8c6b0db2dc4fe diff --git a/community-build/community-projects/akka b/community-build/community-projects/akka index 79b294048f89..2dffb6504005 160000 --- a/community-build/community-projects/akka +++ b/community-build/community-projects/akka @@ -1 +1 @@ -Subproject commit 79b294048f893d9d6b9332618f7aebedce9a5340 +Subproject commit 2dffb6504005a6144561c4e3ba7b185639a8ad48 diff --git a/community-build/community-projects/endpoints4s b/community-build/community-projects/endpoints4s index 3a667a3608ff..cc03ddf1c4a0 160000 --- a/community-build/community-projects/endpoints4s +++ b/community-build/community-projects/endpoints4s @@ -1 +1 @@ -Subproject commit 3a667a3608ff9950c24e9b2b5038c71c1690a21d +Subproject commit cc03ddf1c4a03391c8031784e48c057bdc9394db diff --git a/community-build/community-projects/scalaz b/community-build/community-projects/scalaz index 97cccf3b3fcb..4919bdce732f 160000 --- a/community-build/community-projects/scalaz +++ b/community-build/community-projects/scalaz @@ -1 +1 @@ -Subproject commit 97cccf3b3fcb71885a32b2e567171c0f70b06104 +Subproject commit 4919bdce732f53a3316d5e12d9c853fc2141ddfb diff --git a/compiler/src/dotty/tools/dotc/config/Feature.scala b/compiler/src/dotty/tools/dotc/config/Feature.scala index f5fa383c5636..ad458214058f 100644 --- a/compiler/src/dotty/tools/dotc/config/Feature.scala +++ b/compiler/src/dotty/tools/dotc/config/Feature.scala @@ -63,7 +63,7 @@ object Feature: (clauseInterleaving, "Enable clause interleaving"), (pureFunctions, "Enable pure functions for capture checking"), (captureChecking, "Enable experimental capture checking"), - (into, "Allow into clauses in pattern matches") + (into, "Allow into modifier on parameter types") ) private def enabledLanguageFeaturesBySetting(using Context): List[String] = From 6a07b0a456d6560bc1de21e08d7b4dbb4009b439 Mon Sep 17 00:00:00 2001 From: noti0na1 Date: Tue, 14 May 2024 14:45:33 +0200 Subject: [PATCH 7/7] Add notes for new features --- compiler/src/dotty/tools/dotc/config/Feature.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/src/dotty/tools/dotc/config/Feature.scala b/compiler/src/dotty/tools/dotc/config/Feature.scala index ad458214058f..91100627981b 100644 --- a/compiler/src/dotty/tools/dotc/config/Feature.scala +++ b/compiler/src/dotty/tools/dotc/config/Feature.scala @@ -63,7 +63,10 @@ object Feature: (clauseInterleaving, "Enable clause interleaving"), (pureFunctions, "Enable pure functions for capture checking"), (captureChecking, "Enable experimental capture checking"), - (into, "Allow into modifier on parameter types") + (into, "Allow into modifier on parameter types"), + (namedTuples, "Allow named tuples"), + (modularity, "Enable experimental modularity features"), + (betterMatchTypeExtractors, "Enable better match type extractors") ) private def enabledLanguageFeaturesBySetting(using Context): List[String] =