Skip to content
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

Conversation

JonasKruckenberg
Copy link

fixes #10444 by using the same CompileKinds that artifact dependencies produces

fixes rust-lang#10444 by using the same `CompileKind`s that artifact dependencies produces
@rustbot
Copy link
Collaborator

rustbot commented Sep 1, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added A-cfg-expr Area: Platform cfg expressions S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 1, 2024
@@ -948,6 +948,7 @@ impl<'gctx> RustcTargetData<'gctx> {
}));
for kind in all_kinds {
res.merge_compile_kind(kind)?;
res.requested_kinds.push(kind);
Copy link
Member

Choose a reason for hiding this comment

The 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.

Copy link
Member

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

Copy link
Member

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 😞

Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cfg-expr Area: Platform cfg expressions S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic when combining -Zbuild-std with artifact dependencies
4 participants