-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #11774: only enable experimental features for snapshot and nightly #11852
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
Conversation
@liufengyun rebasing on #11845 should fix the issues of |
d95ae78
to
c16fd52
Compare
|
||
/** Is `feature` enabled by by a command-line setting? The enabling setting is | ||
val experimentalWarningMessage = "Experimental features may only be used with nightly or snapshot version of compiler." |
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.
Maybe we should refine the message by saying that Scala 3 macros
are not experimental.
Using a negative flag rather than a positive means that we'll have a lot more work to do to make sure everything works as expected:
|
@sjrd That makes sense. However, for end-users, asking for both language import and |
4b3ed24
to
fa3b360
Compare
https://github.com/lampepfl/dotty/runs/2176107889#step:7:798 Edit: Fixed in 182861b. |
095bb22
to
8977be4
Compare
/cc @mpilquist: This PR prevents experimental language features from being used with non-nightly compiler builds (following the rust model and to avoid repeating the situation where scala.experimental.macros became de-facto non-experimental), but currently scodec relies on -language:experimental.genericNumberLiterals so it will require a nightly compiler once this PR is merged. |
Thanks for the heads up. I guess this means scodec should remove the |
Right, and I guess these instances could also be provided in a separate project for testing purposes if needed. |
@smarter I can keep the It seems a bit strange that the |
That should work yes, and I agree but we don't have a mechanism to mark APIs themselves as experimental currently (Java has |
OK, I commented out for now. These commits or after should work for community build:
|
@mpilquist It seems the upstream and the community build have diverged: The latest commits in the community build:
We can find a way to sync the upstream and the community build (in another PR). |
community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala
Outdated
Show resolved
Hide resolved
Co-authored-by: Nicolas Stucki <nicolas.stucki@gmail.com>
@@ -28,7 +28,19 @@ object Feature: | |||
val symbolLiterals = deprecated("symbolLiterals") | |||
val fewerBraces = experimental("fewerBraces") | |||
|
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.
@odersky FYI, putting fewerBraces
under experimental
means that it will only available for nightly build of compilers after this PR. Normal releases cannot use the feature.
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.
Yes, that's understood.
…d nightly This reverts PR scala#11852. See scala#11915.
…d nightly This reverts PR scala#11852. See scala#11915.
Revert #11852: only enable experimental features for snapshot and nightly
Fix #11774: only enable experimental features for snapshot and nightly