Skip to content

Handle experimental features in releases #11774

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

Closed
2 tasks
nicolasstucki opened this issue Mar 16, 2021 · 8 comments · Fixed by #11852 or #11920
Closed
2 tasks

Handle experimental features in releases #11774

nicolasstucki opened this issue Mar 16, 2021 · 8 comments · Fixed by #11852 or #11920
Assignees
Milestone

Comments

@nicolasstucki
Copy link
Contributor

To properly handle the usage restrictions on experimental features we need:

  • A flag to enable experimental feature imports (-Xenable-experimental). This flag will enable the use of experimental features trough language imports or language flags.
  • When publishing we need let the binary know if it is a stable release or not (i.e. nightly).
    • Nightly: allows the use of -Xenable-experimental
    • Stable: disallows the use of -Xenable-experimental
@odersky
Copy link
Contributor

odersky commented Mar 17, 2021

I am strictly against a flag. The whole point of language imports is that you don't need a flag a anymore! Flags are obscure, we never know which ones are set, and we don't know how to set them in many situations. For instance, quickly: how do you set a flag in a worksheet? in a notebook? in sbt? in mill? Language imports much better: Clear, readable, self-documenting, easy to discover.

What we should do is enable the experimental language import only for unstable releases.

@nicolasstucki
Copy link
Contributor Author

We should at least have a flag to enable or disable non-release/release on a non-release artifact to be able to test it properly. @sjrd proposed to do it this way. I had originally proposed the opposite, a blag that can be used in nightlies to make it run as if it were a release artifact. This is important to test if the experimental features are properly disabled in the release build before getting we release.

@odersky
Copy link
Contributor

odersky commented Mar 17, 2021

I think having a -Yrelease flag for internal testing would work.

@nafg
Copy link

nafg commented Mar 21, 2021

Maybe it would be more clear if it's called something more like -Ystable-features-only or -Yno-unstable-features

@liufengyun
Copy link
Contributor

The standard library depends on the experimental feature erased. If we were to compile the standard library, we need to break the rule.

@sjrd
Copy link
Member

sjrd commented Mar 22, 2021

Hence #11845

liufengyun added a commit to dotty-staging/dotty that referenced this issue Mar 23, 2021
liufengyun added a commit to dotty-staging/dotty that referenced this issue Mar 25, 2021
liufengyun added a commit that referenced this issue Mar 25, 2021
Fix #11774: only enable experimental features for snapshot and nightly
@liufengyun
Copy link
Contributor

Re-open because of the revert #11916.

@liufengyun liufengyun reopened this Mar 27, 2021
@liufengyun liufengyun removed their assignment Mar 27, 2021
@odersky
Copy link
Contributor

odersky commented Mar 27, 2021

I can take a look unless someone else wants to do it. In which case please re-assign.

@Kordyjan Kordyjan modified the milestones: 3.0.0-RC2, 3.0.0 Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment