-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat(toml): Parse support for multiple build scripts #15630
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
Merged
Merged
+645
−76
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feel free to rebase on |
epage
reviewed
Jun 5, 2025
epage
reviewed
Jun 5, 2025
epage
reviewed
Jun 5, 2025
60fe887
to
f6bebc3
Compare
b7a6036
to
1d18b6b
Compare
epage
reviewed
Jun 9, 2025
epage
reviewed
Jun 9, 2025
epage
reviewed
Jun 9, 2025
epage
reviewed
Jun 9, 2025
epage
reviewed
Jun 9, 2025
epage
reviewed
Jun 9, 2025
epage
reviewed
Jun 9, 2025
0321144
to
6de78d5
Compare
21dbd79
to
902bd62
Compare
epage
reviewed
Jun 12, 2025
epage
reviewed
Jun 12, 2025
902bd62
to
98a9565
Compare
epage
reviewed
Jun 12, 2025
src/cargo/util/toml/targets.rs
Outdated
Comment on lines
108
to
114
if custom_build.len() > 1 { | ||
anyhow::bail!("multiple build scripts feature is not implemented yet! ") | ||
} | ||
let custom_build = Path::new(&custom_build[0]); | ||
let name = format!( | ||
"build-script-{}", | ||
custom_build |
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.
- We'll need to loop over
- Do we need to make build script names more unique?
epage
reviewed
Jun 12, 2025
d419489
to
ce0aacd
Compare
951888c
to
6dd2227
Compare
r? @epage |
99a459d
to
c01a8bd
Compare
epage
reviewed
Jun 20, 2025
a123df8
to
74b5190
Compare
74b5190
to
5c7f68f
Compare
epage
approved these changes
Jun 23, 2025
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-documenting-cargo-itself
Area: Cargo's documentation
A-manifest
Area: Cargo.toml issues
A-unstable
Area: nightly unstable support
Command-vendor
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Everyone!
This is PR for the manifest parsing of the first milestone of GSoC Project : Build Script Delegation
What does this PR try to resolve?
Currently, just a single build script is allowed for each package. This PR will allow users to create and use multiple build scripts, and is backward compatible with single script as well as boolean values.
Motivation : This will help users to maintain separate smaller and cleaner build scripts instead of one large build script. This is also necessary for build script delegation.
Open questions:
Known Issues:
How to test and review this PR?
There is a feature gate
multiple-build-scripts
that can be passed viacargo-features
inCargo.toml
. So, you have to addPreferably on the top of the
Cargo.toml
and use nightly toolchain to use the featureThis PR is ready to be reviewed and merged