-
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: preserve jobserver file descriptors on rustc invocation in fix_exec_rustc
#12951
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
r? @weihanglo (rustbot has picked a reviewer for you, use r? to override) |
rustbot
added
Command-fix
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Nov 10, 2023
weihanglo
approved these changes
Nov 10, 2023
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.
Make sense. Thank you!
@bors r+ |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Nov 10, 2023
☀️ Test successful - checks-actions |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 10, 2023
Update cargo 12 commits in 7046d992f9f32ba209a8079f662ebccf9da8de25..6790a5127895debec95c24aefaeb18e059270df3 2023-11-08 03:24:57 +0000 to 2023-11-10 17:09:35 +0000 - refactor(source): Prepare for new PackageIDSpec syntax (rust-lang/cargo#12938) - credential: include license files in all published crates (rust-lang/cargo#12953) - fix: preserve jobserver file descriptors on rustc invocation in `fix_exec_rustc` (rust-lang/cargo#12951) - refactor(resolver): Consolidate logic in `VersionPreferences` (rust-lang/cargo#12930) - refactor(toml): Simplify code to make schema split easier (rust-lang/cargo#12948) - Filter `cargo-credential-*` dependencies by OS (rust-lang/cargo#12949) - refactor(util): Pull out `mod util_semver` (rust-lang/cargo#12940) - Fix the invalidate feature name message (rust-lang/cargo#12939) - refactor(util): Prepare for splitting out semver logic (rust-lang/cargo#12926) - feat: Make browser links out of HTML file paths (rust-lang/cargo#12889) - Do not allow empty feature name (rust-lang/cargo#12928) - fix(timings): unnecessary backslash when error happens (rust-lang/cargo#12934) r? ghost
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 11, 2023
Update cargo 12 commits in 7046d992f9f32ba209a8079f662ebccf9da8de25..6790a5127895debec95c24aefaeb18e059270df3 2023-11-08 03:24:57 +0000 to 2023-11-10 17:09:35 +0000 - refactor(source): Prepare for new PackageIDSpec syntax (rust-lang/cargo#12938) - credential: include license files in all published crates (rust-lang/cargo#12953) - fix: preserve jobserver file descriptors on rustc invocation in `fix_exec_rustc` (rust-lang/cargo#12951) - refactor(resolver): Consolidate logic in `VersionPreferences` (rust-lang/cargo#12930) - refactor(toml): Simplify code to make schema split easier (rust-lang/cargo#12948) - Filter `cargo-credential-*` dependencies by OS (rust-lang/cargo#12949) - refactor(util): Pull out `mod util_semver` (rust-lang/cargo#12940) - Fix the invalidate feature name message (rust-lang/cargo#12939) - refactor(util): Prepare for splitting out semver logic (rust-lang/cargo#12926) - feat: Make browser links out of HTML file paths (rust-lang/cargo#12889) - Do not allow empty feature name (rust-lang/cargo#12928) - fix(timings): unnecessary backslash when error happens (rust-lang/cargo#12934) r? ghost
bors
added a commit
that referenced
this pull request
Dec 31, 2023
`cargo fix`: always inherit the jobserver #12951 changed `cargo fix` to ensure that `rustc` has access to the jobserver. However, it only did that for the final "verification" step. It was not set for any of the previous calls to rustc (which is up to ~5 calls). I'm not sure if this was done intentionally, I did not see any discussion of this in #12951. This isn't too important in the grand scheme of things, because `rustc` is not doing codegen, so the parallel behavior is currently not used. However, this removes an extraneous `warning: failed to connect to jobserver from environment variable` warning that is printed in cargo's log every time it runs rustc. It also might be relevant in the future if rustc enables the parallel frontend.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Command-fix
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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.
Similar to #12447
Command
cargo fix
invokescargo rustc
. It sends environment variable which points to closed file descriptors.This PR makes cargo compatible with rust-lang/rust#113730.
It should be enough to have tests in rustc. It seems to be good to have more centralized way to pass jobserver.