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

Cargo Tree: New format string parameter #14008

Conversation

timbess
Copy link
Contributor

@timbess timbess commented Jun 4, 2024

Add new format parameter to allow querying what platform each dependency is built for.

What does this PR try to resolve?

rules_rust is using cargo tree to query the dependency graph and create an equivalent internal graph of dependencies per architecture it's configured to build for. The issue I observed with their current implementation is that they were querying all build dependencies when querying for each target architecture, which caused host architecture only transitive build deps to be added to graph of the target architecture.

I tried querying with just build edges, but then we don't get to see the normal transitive deps under the build deps so we can't actually build a dependency graph of all the build deps accurately using filtering. Next I went to look through the format parameters and saw there wasn't really a way for me to extract what platform it's building for, hence this PR.

@rustbot
Copy link
Collaborator

rustbot commented Jun 4, 2024

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added Command-tree S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 4, 2024
@epage
Copy link
Contributor

epage commented Jun 4, 2024

While I appreciate this is a draft, we should likely reserve any conversations about "what is the problem", "what the the possible solutions", and "which solution do we want" to an issue.

@timbess
Copy link
Contributor Author

timbess commented Jun 4, 2024

@epage I can copy this to an Issue. I was just filling out the template Github presented when I opened the PR.

@epage
Copy link
Contributor

epage commented Jun 4, 2024

For future reference, you can find out process at https://doc.crates.io/contrib/process/working-on-cargo.html#before-hacking-on-cargo

@timbess timbess marked this pull request as ready for review June 4, 2024 17:07
@timbess timbess closed this Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-tree 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.

4 participants