-
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: generate std roots based on all collected targets #14480
Closed
JonasKruckenberg
wants to merge
1
commit into
rust-lang:master
from
JonasKruckenberg:fix-artifact-deps-build-std
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -915,7 +915,7 @@ impl<'gctx> RustcTargetData<'gctx> { | |
let mut res = RustcTargetData { | ||
rustc, | ||
gctx, | ||
requested_kinds: requested_kinds.into(), | ||
requested_kinds: Vec::new(), | ||
host_config, | ||
host_info, | ||
target_config, | ||
|
@@ -948,6 +948,7 @@ impl<'gctx> RustcTargetData<'gctx> { | |
})); | ||
for kind in all_kinds { | ||
res.merge_compile_kind(kind)?; | ||
res.requested_kinds.push(kind); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This only collects target triples from workspace members. It doesn't walk through the entire dependency graph. I believe if there is a transitive artifact dependency requiring an extra target triple it will fail. We need a test case to verify it. |
||
} | ||
|
||
Ok(res) | ||
|
@@ -1023,6 +1024,10 @@ impl<'gctx> RustcTargetData<'gctx> { | |
CompileKind::Target(s) => &self.target_config[&s], | ||
} | ||
} | ||
|
||
pub fn requested_kinds(&self) -> &[CompileKind] { | ||
&self.requested_kinds | ||
} | ||
} | ||
|
||
/// Structure used to deal with Rustdoc fingerprinting | ||
|
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
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
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.
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 for putting effort on a fix. This seems incomplete and lacks tests. Could you follow the atomic commit pattern that the first commit contains tests and passes. The second shows the actual fix and test change.
https://doc.crates.io/contrib/process/working-on-cargo.html#submitting-a-pull-request
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.
I think we are looking for something like ehuss suggesting: #10444 (comment), though I personally have no time working on a proper refactor 😞
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.
Yeah, this had originally fixed my issue but after some more testing it appears to also cause more issues in other places :/ It appears you are correct and a proper fix is somewhat more complex. Gonna close this for now