-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Change precedence of build-override
#10787
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (or someone else) soon. Please see the contribution instructions for more information. |
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.
Looks nice to me. It would be nice if the commits could be squashed. Thanks!
fabcb46
to
fa24272
Compare
If you specify both `build-override` and `package."*"` then the glob profile has higher precedence than that `build-override` one which is much more specific. In practice this means that very often the `build-override` is just completely ignored and all the proc macro crates get compiled without the `build-override` actually doing anything. This usually results in `debug` builds taking much longer than they should, often even longer than `release` builds. This Pull Request fixes this precedence issue. Update docs to reflect change in `build-override` precedence Also, apply `package."*"` overrides before `build-override` defaults. This ensures the defaults for `build-override` take precedence as well (and not just the overrides provided by the user).
fa24272
to
ede065f
Compare
Squashed 🙂 |
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.
Looks nice. Thanks for the PR!
Also thanks @hi-rustin for the review
@bors r+ |
📌 Commit ede065f has been approved by |
Change precedence of `build-override` See the original PR here <#9382> > If you specify both `build-override` and `package."*"` then the glob profile has higher precedence than the `build-override` one which is much more specific. In practice this means that very often the `build-override` is just completely ignored and all the proc macro crates get compiled without the `build-override` actually doing anything. This usually results in `debug` builds taking much longer than they should, often even longer than `release` builds. This Pull Request fixes this precedence issue. This includes those changes along with the necessary documentation changes. Additionally, the `build-override` defaults (and not just overrides supplied by the user) are now applied before `package."*"` overrides. Fixes #9351
@bors r- |
💔 Test failed - checks-actions |
@rfcbot merge It makes sense to me as a more specific overrides taking higher precedence than glob one. Though this changes the old behaviour, need the team to take a look. |
Team member @weihanglo has proposed to merge this. The next step is review by the rest of the tagged team members: Concerns:
Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
@rfcbot concern future-globs This changes the precedence from
to
With the original, it can really be simplified to
Where our glob syntax only allows What is the likelihood we'd expand our glob syntax? What would this change look like after expanding our glob syntax? Would we want literals to come first, then |
@rfcbot concern intuition When writing up the previous concern, I realized that there is also an intuition problem. While the original issue said that |
This might be a bit of a sidetrack, but IMO it is already a bit unintuitive that workspace members are excluded from
With crates having arbitrary names I find it difficult to imagine a more complex glob being reliable. Maybe if it was limited to workspace members? Some way to configure multiple crates at once seems like it would be useful (unless
This makes me realize the current changes would still leave no way to specifically configure I wasn't aware that |
Brainstorming hat: Besides any |
It seems like we would need a whole separate |
☀️ Try build successful - checks-actions |
With the concerns pointed out by @epage, I'm not really happy with the current solution. For my own purposes, it seems like in the short term it would be better to just target specific build-time crates with configuration and/or see if I can use What would the steps be to move forward with designing an alternative? (happy to discuss further on zulip if that would be ideal) The initial idea that comes to mind is being able to specify |
@rfcbot close Thanks @Imberflur for your efforts. We're still seeking a solution to #9351. |
@rfcbot cancel |
@weihanglo proposal cancelled. |
The Cargo team doesn't have a bandwidth to lead this change by ourselves. That is to say, if @Imberflur or someone wants things to move forward, you must be the driver for the design! We're still open to discuss on either Zulip or GitHub issue (#9351). Closing for now. Thank you! |
See the original PR here #9382
This includes those changes along with the necessary documentation changes. Additionally, the
build-override
defaults (and not just overrides supplied by the user) are now applied beforepackage."*"
overrides.Fixes #9351