-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Standardize how previously experimental features are handled #21686
base: main
Are you sure you want to change the base?
Conversation
If a feature was previously experimental and is now standard, we change any tests for that feature to be only dependent on the source version where the feature was standardized. Language imports in old source versions will no longer enable the feature. (And these language imports also come with a deprecation message). If a feature was previously experimental and is now dropped, the feature becomes unavailable also in old versions. The motivation to do it this way is to insist that experimental features are ephemeral. We should not be able to rely on an experimental feature forever in an old version. This commit implements this policy for fewerBraces and clauseInterleaving. Two implemented extensions (relaxedExtensionImports, betterMatchTypeExtractors) already implemented it before.
This can be merged only when we switch to 3.6.0 as the bootstrap compiler. Since pc tests need NamedTuple and they run in |
I've opened a PR (#21708) suggesting to drop the non-bootsrapped PC |
@@ -28,7 +28,6 @@ object Feature: | |||
val dependent = experimental("dependent") | |||
val erasedDefinitions = experimental("erasedDefinitions") | |||
val symbolLiterals = deprecated("symbolLiterals") | |||
val fewerBraces = experimental("fewerBraces") | |||
val saferExceptions = experimental("saferExceptions") | |||
val clauseInterleaving = experimental("clauseInterleaving") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not drop this one too ?
val clauseInterleaving = experimental("clauseInterleaving") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove namedTuples
in line 36 too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can actually drop this test, it's purpose was to check that we require the import when the source is < 3.6
def enablesNewGivens = isAtLeast(`3.6`) | ||
def enablesNamedTuples = isAtLeast(`3.6`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see where these two functions are used so far
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a feature was previously experimental and is now standard, we change any tests for that feature to be only dependent on the source version where the feature was standardized. Language imports in old source versions will no longer enable the feature. (And these language imports also come with a deprecation message).
If a feature was previously experimental and is now dropped, the feature becomes unavailable also in old versions.
The motivation to do it this way is to insist that experimental features are ephemeral. We should not be able to rely on an experimental feature forever in an old version.
This commit implements this policy for fewerBraces and clauseInterleaving. Two implemented extensions (relaxedExtensionImports, betterMatchTypeExtractors) already implemented it before.