- Notifications
You must be signed in to change notification settings - Fork 1.1k
Add -experimental compiler flags #18571
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
Add -experimental compiler flags #18571
Conversation
8719eaf to 90c9489 Compare | @@ -0,0 +1,18 @@ | |||
| //> using options -experimental -Yno-experimental | |||
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.
-Yno-experimental is set to disable experimental features on this snapshot. -experimental is set to add @experimental to the top-level definitions.
90c9489 to 025c211 Compare 025c211 to 24f4fae Compare 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.
Otherwise LGTM
When enabled, all top-level definitions are annotated as `@experimental`. This implies that all experimental language features and definitions can be used in this project. Note that this does not change the strong guarantees on stability of non-experimental code. The experimental features can only be used in a experimental scope (transitively). This flags does not affect the use of `ResearchPlugin`.
24f4fae to 69cc0ee Compare 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.
LGTM for now.
Should this go into the tasty attribute that contains already the other tags instead of being a separate annotation? If yes, that could be done in a follow-on PR.
Technically it could work. Not sure if it would be benefitial. |
| Could this be backported to LTS 3.3? |
| Backporting it to LTS would really be nice. For example there is no more way to use scalamock 7.x for the project depending on the LTS scala :( |
| After some discussions within the compiler team it was decided that this should not be backported to 3.3 LTS, which focuses on stability rather than using experimental features |
When enabled, all top-level definitions are annotated as
@experimental.This implies that all experimental language features and definitions can
be used in this project.
Note that this does not change the strong guarantees on stability of
non-experimental code. The experimental features can only be used in a
experimental scope (transitively).
This flags does not affect the use of
ResearchPlugin.Follow up of https://contributors.scala-lang.org/t/behaviour-of-experimental-in-scala-3/6309/27?u=nicolasstucki