-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Added build_directory
field to cargo metadata output
#15377
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
weihanglo
merged 2 commits into
rust-lang:master
from
ranger-ross:cargo-metadata-build-dir
Apr 2, 2025
Merged
Added build_directory
field to cargo metadata output
#15377
weihanglo
merged 2 commits into
rust-lang:master
from
ranger-ross:cargo-metadata-build-dir
Apr 2, 2025
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
weihanglo
approved these changes
Apr 2, 2025
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 good. Thank you!
22 tasks
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 6, 2025
Update cargo 17 commits in a6c604d1b8a2f2a8ff1f3ba6092f9fda42f4b7e9..0e93c5bf6a1d5ee7bc2af63d1afb16cd28793601 2025-03-26 18:11:00 +0000 to 2025-04-05 00:00:24 +0000 - chore(deps): bump openssl from 0.10.71 to 0.10.72 (rust-lang/cargo#15394) - chore(ci): restore cargo-util semver check (rust-lang/cargo#15389) - docs(changelog): polish changelog items (rust-lang/cargo#15379) - chore(deps): update msrv (1 version) to v1.86 (rust-lang/cargo#15381) - chore: add aarch64 linux runner (rust-lang/cargo#15077) - Added `build_directory` field to cargo metadata output (rust-lang/cargo#15377) - chore(deps): update rust crate rusqlite to 0.34.0 (rust-lang/cargo#15373) - Prevent undeclared public network access (rust-lang/cargo#15368) - rename the `author` field to be `authors` in book.toml (rust-lang/cargo#15362) - move modules from kebab-case to snake_case (rust-lang/cargo#14439) - chore: bump to 0.89.0; update changelog (rust-lang/cargo#15372) - docs(unstable): update `-Zrustdoc-depinfo` tracking issue link (rust-lang/cargo#15371) - fix(tree): Make output more deterministic (rust-lang/cargo#15369) - feat: rustdoc depinfo rebuild detection via -Zrustdoc-depinfo (rust-lang/cargo#15359) - Rename the gc config table (rust-lang/cargo#15367) - Revert "Temporarily ignore cargo_test_doctest_xcompile_ignores" (rust-lang/cargo#15357) - Don't canonicalize executable path in `cargo_exe` (rust-lang/cargo#15355) r? ghost
github-merge-queue bot
pushed a commit
that referenced
this pull request
Apr 9, 2025
…#15410) <!-- Thanks for submitting a pull request 🎉! Here are some tips for you: * If this is your first contribution, read "Cargo Contribution Guide" first: https://doc.crates.io/contrib/ * Run `cargo fmt --all` to format your code changes. * Small commits and pull requests are always preferable and easy to review. * If your idea is large and needs feedback from the community, read how: https://doc.crates.io/contrib/process/#working-on-large-features * Cargo takes care of compatibility. Read our design principles: https://doc.crates.io/contrib/design.html * When changing help text of cargo commands, follow the steps to generate docs: https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages * If your PR is not finished, set it as "draft" PR or add "WIP" in its title. * It's ok to use the CI resources to test your PR, but please don't abuse them. ### What does this PR try to resolve? Explain the motivation behind this change. A clear overview along with an in-depth explanation are helpful. You can use `Fixes #<issue number>` to associate this PR to an existing issue. ### How should we test and review this PR? Demonstrate how you test this change and guide reviewers through your PR. With a smooth review process, a pull request usually gets reviewed quicker. If you don't know how to write and run your tests, please read the guide: https://doc.crates.io/contrib/tests ### Additional information Other information you want to mention in this PR, such as prior arts, future extensions, an unresolved problem, or a TODO list. --> ### What does this PR try to resolve? Follow up to #15377 that documents `build_directory` in the cargo metadata docs. I did not mention that this feature is not stable yet, let me know if it would be better to a note that this is nightly only. Not sure how we normally handle documenting non-stable features cc: #14125
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Command-metadata
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.
What does this PR try to resolve?
This PR continues on the build-dir work laid in #14125. (see this comment)
We add a new
build_directory
field to thecargo metadata
output when the-Z build-dir
feature flag is enabled.How should we test and review this PR?
I added a test for metadata output when build-dir is set. There are already many existing tests that verify that build-dir is not included if
-Z build-dir
is not passed.Additional information
NOTE: I use
build_directory
instead ofbuild-dir
to match the existingtarget_directory
field in the metadata outputr? @epage