-
Notifications
You must be signed in to change notification settings - Fork 459
Promote the toolchain feature flag to official feature #11053
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
|
cc @maiste I think the binary release would need to be updated if this is merged. |
maiste
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.
Indeed! To prevent this from happening, could you also update the /flake.nix file and remove the flag, please? 😄 Nothing to do on the binary-distribution side.
Done! |
|
Instead of removing it, you could also just flip the default. Not sure if we'd like to keep this mode, but we don't have to delete it right away |
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.
Depending on if you prefer to go with @rgrinberg solution or not. But otherwise, LGTM.
src/dune_rules/pkg_toolchain.ml
Outdated
| let is_compiler name = | ||
| let module Package_name = Dune_pkg.Package_name in | ||
| let compiler_package_names = | ||
| (* TODO don't hardcode these names here *) |
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.
You could probably check this by looking at the compiler value in the list of flags: (in the opam file).
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.
Indeed, that would be cleaner. However I can't find a way to transmute a Dune_lang.Package_name.t into a Dune_pkg.Opam_file.t = OpamParserTypes.FullPos.opamfile, which would allow looking into the flags
As this is not related to the core of this PR, I'll leave the TODO for now
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.
What you're trying is not possible. A Package_name.t is just the name of a package (basically a fancy way to say string); to get an Opam_file.t you'd need to load an opam repository, look up a Package_name.t and a Package_version.t into a specific OPAM file and then check its flags there.
I also vaguely recall that there was some issue about determining the packages affected from the compiler flag, but I don't recall the details anymore.
b29f3c6 to
28fbd42
Compare
Signed-off-by: Ambre Austen Suhamy <ambre@tarides.com>
Signed-off-by: Ambre Austen Suhamy <ambre@tarides.com>
28fbd42 to
bcbff43
Compare
|
I ended up with only the soft approach: make it enabled by default but not delete it entirely. Also this is rebased on main now |
This PR sports
2 commits, the first one being a less-committed approach to the situation, the second a more complete one.just the one commit that makes the flag enabled by default.There seems to be sentiment around the dune team (cc @Leonidas-from-XIV @rgrinberg @gridbugs in particular) that:
Thus, I propose that we
get rid ofpromote the feature flag.Note that this is a BREAKING change for users who use./configure --toolchains disabledobviously, but also./configure --toolchains enabledas the flag will no longer get recognized.Not a breaking change anymore, I just changed the default.