-
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
fix(build-std): always link to std when testing proc-macros #14850
Merged
Conversation
This file contains 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
rustbot
added
A-build-execution
Area: anything dealing with executing the compiler
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Nov 22, 2024
weihanglo
added
Z-build-std
Nightly: build-std
A-proc-macro
Area: compiling proc-macros
labels
Nov 22, 2024
ehuss
approved these changes
Nov 26, 2024
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.
Thanks!
fredszaq
added a commit
to sonos/dinghy
that referenced
this pull request
Nov 26, 2024
This reverts commit 3244bc9. This can be reenabled as rust-lang/cargo#14735 was fixed via rust-lang/cargo#14850
This was referenced Nov 26, 2024
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 26, 2024
### What does this PR try to resolve? Download dependencies first, So that we can assert the full output of `cargo test` without wildcard. This regressed since #14850 ### How should we test and review this PR? CI passes.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 30, 2024
Update cargo 8 commits in 4c39aaff66862cc0da52fe529aa1990bb8bb9a22..3908f64086a3d7b9af8d87b4da2bd100776c3e61 2024-11-25 16:36:17 +0000 to 2024-11-29 17:32:44 +0000 - chore(deps): update msrv (rust-lang/cargo#14867) - fix(fix): Migrate cargo script manifests across editions (rust-lang/cargo#14864) - feat(toml): Allow adding/removing from cargo scripts (rust-lang/cargo#14857) - Add future-incompat warning against keywords in cfgs and add raw-idents (rust-lang/cargo#14671) - test(build-std): download deps first (rust-lang/cargo#14861) - test(pgo): ensure PGO works (rust-lang/cargo#14859) - git-fetch-with-cli: Set `GIT_DIR` for bare repository compatibility (rust-lang/cargo#14860) - fix(build-std): always link to std when testing proc-macros (rust-lang/cargo#14850)
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 4, 2024
Update cargo 17 commits in 4c39aaff66862cc0da52fe529aa1990bb8bb9a22..05f54fdc34310f458033af8a63ce1d699fae8bf6 2024-11-25 16:36:17 +0000 to 2024-12-03 03:14:12 +0000 - test(pgo): only run on nightly (rust-lang/cargo#14887) - chore: Bump to 0.86.0; update changelog (rust-lang/cargo#14885) - docs(ref): Finish a sentence on rust-versions (rust-lang/cargo#14884) - chore(deps): update rust crate cargo_metadata to 0.19.0 (rust-lang/cargo#14878) - chore(deps): update rust crate gix to 0.68.0 (rust-lang/cargo#14879) - fix: Remove default registry reference in `info` cmd docs (rust-lang/cargo#14880) - test(pgo): determine test runnability at compile time (rust-lang/cargo#14874) - test: `requires` attribute accepts string literals for cmds (rust-lang/cargo#14875) - chore(deps): update msrv (3 versions) to v1.81 (rust-lang/cargo#14871) - chore(deps): update msrv (rust-lang/cargo#14867) - fix(fix): Migrate cargo script manifests across editions (rust-lang/cargo#14864) - feat(toml): Allow adding/removing from cargo scripts (rust-lang/cargo#14857) - Add future-incompat warning against keywords in cfgs and add raw-idents (rust-lang/cargo#14671) - test(build-std): download deps first (rust-lang/cargo#14861) - test(pgo): ensure PGO works (rust-lang/cargo#14859) - git-fetch-with-cli: Set `GIT_DIR` for bare repository compatibility (rust-lang/cargo#14860) - fix(build-std): always link to std when testing proc-macros (rust-lang/cargo#14850)
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Dec 6, 2024
Update cargo 17 commits in 4c39aaff66862cc0da52fe529aa1990bb8bb9a22..05f54fdc34310f458033af8a63ce1d699fae8bf6 2024-11-25 16:36:17 +0000 to 2024-12-03 03:14:12 +0000 - test(pgo): only run on nightly (rust-lang/cargo#14887) - chore: Bump to 0.86.0; update changelog (rust-lang/cargo#14885) - docs(ref): Finish a sentence on rust-versions (rust-lang/cargo#14884) - chore(deps): update rust crate cargo_metadata to 0.19.0 (rust-lang/cargo#14878) - chore(deps): update rust crate gix to 0.68.0 (rust-lang/cargo#14879) - fix: Remove default registry reference in `info` cmd docs (rust-lang/cargo#14880) - test(pgo): determine test runnability at compile time (rust-lang/cargo#14874) - test: `requires` attribute accepts string literals for cmds (rust-lang/cargo#14875) - chore(deps): update msrv (3 versions) to v1.81 (rust-lang/cargo#14871) - chore(deps): update msrv (rust-lang/cargo#14867) - fix(fix): Migrate cargo script manifests across editions (rust-lang/cargo#14864) - feat(toml): Allow adding/removing from cargo scripts (rust-lang/cargo#14857) - Add future-incompat warning against keywords in cfgs and add raw-idents (rust-lang/cargo#14671) - test(build-std): download deps first (rust-lang/cargo#14861) - test(pgo): ensure PGO works (rust-lang/cargo#14859) - git-fetch-with-cli: Set `GIT_DIR` for bare repository compatibility (rust-lang/cargo#14860) - fix(build-std): always link to std when testing proc-macros (rust-lang/cargo#14850)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-build-execution
Area: anything dealing with executing the compiler
A-proc-macro
Area: compiling proc-macros
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Z-build-std
Nightly: build-std
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?
Fixes #14735
rust-lang/rust#131188 removes libstd.so from sysroot so
cargo test -Zbuild-std
no longer links to it. That results in a "Library not loaded: @rpath/libstd-[HASH].dylib" when testing a proc macro.This is a pretty niche use case, though it can be easily reproduced by running
cargo test -Zbuild-std
in any proc-macro package. Like in serde-rs/serde running it would fail.This patch adds a special case that if it is
cargo run/test
against a proc-macro, fill in std dynamic library search path for it.How should we test and review this PR?
or
Additional information