Skip to content

Expose artifact dependency getters in cargo-as-a-library #15753

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

Merged
merged 1 commit into from
Jul 18, 2025

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Jul 18, 2025

What does this PR try to resolve?

Information about artifact dependencies is already available through cargo metadata, and therefore also through serializing and re-parsing dependency.serialized() using serde_json::to_value + serde_json::from_value. This PR makes the same information available directly through the library API of cargo::core::Dependency.

I ran into these private methods while working on #15751.

How to test and review this PR?

cargo check

@rustbot
Copy link
Collaborator

rustbot commented Jul 18, 2025

r? @epage

rustbot has assigned @epage.
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 A-crate-dependencies Area: [dependencies] of any kind S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 18, 2025
@epage epage enabled auto-merge July 18, 2025 18:17
@epage epage added this pull request to the merge queue Jul 18, 2025
Merged via the queue into rust-lang:master with commit f5b3a6b Jul 18, 2025
24 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-crate-dependencies Area: [dependencies] of any kind
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants