Skip to content

Rust: Take dependency renaming into account when extracting the crate graph#19057

Merged
hvitved merged 3 commits intogithub:mainfrom
hvitved:rust/dependency-renaming
Mar 20, 2025
Merged

Rust: Take dependency renaming into account when extracting the crate graph#19057
hvitved merged 3 commits intogithub:mainfrom
hvitved:rust/dependency-renaming

Conversation

@hvitved
Copy link
Copy Markdown
Contributor

@hvitved hvitved commented Mar 18, 2025

This PR extracts dependency renaming, for example as in

[dependencies]
my_serde = {package = "serde", version = "1.0.217"}

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Mar 18, 2025
@hvitved hvitved force-pushed the rust/dependency-renaming branch from 115affc to 538a22a Compare March 18, 2025 20:55
@hvitved hvitved changed the title Rust: Take depdency renaming into account when extracting the crate graph Rust: Take dependency renaming into account when extracting the crate graph Mar 18, 2025
@hvitved hvitved force-pushed the rust/dependency-renaming branch from 538a22a to 0bf2bfa Compare March 19, 2025 07:39
Comment on lines +82 to +83
#-----| md5 -> Crate(md5@0.10.6)
#-----| md5_alt -> Crate(md5@0.7.0)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we see that the renamed md5_alt is picked up.

@hvitved hvitved requested a review from aibaars March 19, 2025 08:00
@hvitved hvitved marked this pull request as ready for review March 19, 2025 08:00
@qltest.skip
@ql.internal
class NamedCrate(Element):
name: optional[string]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make the name non-optional?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'll fix.

aibaars
aibaars previously approved these changes Mar 20, 2025
Copy link
Copy Markdown
Contributor

@aibaars aibaars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Just wondering whether we should make name non-optional. Possibly having a NamedCrate without name feels a bit odd.

@hvitved hvitved merged commit 9b58da7 into github:main Mar 20, 2025
17 checks passed
@hvitved hvitved deleted the rust/dependency-renaming branch March 20, 2025 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants