-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
cli: Add required --experimental flag for experimental features (e.g. --trim)
#56045
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
The intention is to use this for "early alpha" kind of features, which are available to early adopters but still in active feature development (i.e. they may be very incomplete) and not ready for use in production yet. The only feature gated behind this right now is `--trim`, whose core functionality is implemented but which still has a ways to go before we think the ecosystem / feature-set is ready for general users to adopt.
|
I still slightly favor renaming But either way is good with me. Might be worth input from triage. |
|
I don't think we need to be that cautious. People may set and forget |
|
Triage likes |
|
If experimental becomes a string-flag like that, could it be nice to also have an envvar like |
|
I'm happy with this PR the way it is. Having to pass the names of individual experimental features feels too fiddly to me. There's basically only one question: is this command future-proof or not? If you've passed |
StefanKarpinski
left a comment
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.
|
Maybe a middle-of-the-road solution would be to have more coarse-grained I think it's safe to group all of the experimental CLI features together, but for experimental language features (which I think @Keno has speculated about maybe introducing) it's probably worth having a specific opt-in. |
the PR - JuliaLang#56045 made this argument required for trimming
|
I have no idea how to pass this flag. $ ./julia contrib/juliac.jl --output-exe hello hello.jl --trim
ERROR: julia: --trim is an experimental feature, you must enable it with --experimental
$ ./julia contrib/juliac.jl --output-exe hello hello.jl --trim --experimental
Unexpected argument `--experimental`
$ ./julia contrib/juliac.jl --experimental --output-exe hello hello.jl --trim
Unexpected argument `--experimental`??? (I built Julia from master just now) |
|
That's due to #56602 - I'll try to make some "executive" decisions and push that along today |
The intention here is to clearly signal when a feature is "not yet fully implemented" vs. "feature-complete and in pre-release" vs. "fully released and ready for production use"
The only feature gated behind this right now is
--trim. Trim has its core functionality implemented (and folks seem to be enjoying it!) but the deployment / linking story in particular is still in its very early stages, esp. because our existing techniques for, e.g., pre-loadinglibunwind,libstdc++, etc. no longer work in a shared library context.Once
--trimis ready for a broader chunk of the ecosystem / language, we can peel off the--experimentalflag