Skip to content

Conversation

@topolarity
Copy link
Member

@topolarity topolarity commented Oct 8, 2024

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-loading libunwind, libstdc++, etc. no longer work in a shared library context.

Once --trim is ready for a broader chunk of the ecosystem / language, we can peel off the --experimental flag

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.
@topolarity
Copy link
Member Author

topolarity commented Oct 8, 2024

I still slightly favor renaming --trim to --experimental-trim - I think folks are likely to set --experimental and forget

But either way is good with me. Might be worth input from triage.

@topolarity topolarity added the triage This should be discussed on a triage call label Oct 10, 2024
@StefanKarpinski
Copy link
Member

I don't think we need to be that cautious. People may set and forget --experimental but they did have to set it. It also has the advantage of being forwards compatible: if you have something that's working and it stops being experimental then you don't have to change your scripts once that thing stops being experimental. You can remove the experimental flag but you don't need to.

@LilithHafner LilithHafner added triage This should be discussed on a triage call and removed triage This should be discussed on a triage call labels Nov 7, 2024
@oscardssmith
Copy link
Member

Triage likes --experimental="trim,other_experimental_option" --trim since this way experimental arguments are explicitly opted into, but it doesn't break scripts for experimental CLI arguments to "graduate" to non-experimental status.

@LilithHafner LilithHafner removed the triage This should be discussed on a triage call label Nov 7, 2024
@tecosaur
Copy link
Member

tecosaur commented Nov 7, 2024

If experimental becomes a string-flag like that, could it be nice to also have an envvar like JULIA_EXPERIMENTAL_FEATURES="trim,some_other_feature" that serves as the default value when --experimental is not explicitly passed?

@StefanKarpinski
Copy link
Member

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 --experimental then it's possible that it will break; if you haven't passed --experimental then it should work.

Copy link
Member

@StefanKarpinski StefanKarpinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@topolarity
Copy link
Member Author

Maybe a middle-of-the-road solution would be to have more coarse-grained --experimental categories? Something like:

--experimental="cli-options,language-feature-x"

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.

@vtjnash vtjnash merged commit c5899c2 into JuliaLang:master Nov 18, 2024
3 checks passed
baggepinnen added a commit to baggepinnen/julia that referenced this pull request Nov 19, 2024
the PR
- JuliaLang#56045

made this argument required for trimming
@biona001
Copy link

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)

@topolarity
Copy link
Member Author

That's due to #56602 - I'll try to make some "executive" decisions and push that along today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants