Skip to content

Conversation

@tofay
Copy link
Contributor

@tofay tofay commented Jan 20, 2022

Cargo supports renamed dependencies in Cargo.toml: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml

component-detection currently misses such dependencies, as it uses the renamed dependency name when determining what the root dependencies on. This PR updates component detection to use the real dependency name in such cases.

@tofay tofay requested a review from a team as a code owner January 20, 2022 09:50
@tofay tofay requested a review from JamieMagee January 20, 2022 09:50
@tofay tofay force-pushed the tofay/renamed-rust-crates branch from 07af8fa to 71c0c4d Compare January 20, 2022 09:59
@github-actions
Copy link

👋 Hi! It looks like you modified some files in the Detectors folder.
You may need to bump the detector versions if any of the following scenarios apply:

  • The detector detects more or fewer components than before
  • The detector generates different parent/child graph relationships than before
  • The detector generates different devDependencies values than before

If none of the above scenarios apply, feel free to ignore this comment 🙂

@JamieMagee JamieMagee added the detector:rust The Rust Cargo detector label Jan 26, 2022
@JamieMagee
Copy link
Member

@tofay Sorry for the delay. Can you deconflict your PR?

@tofay tofay force-pushed the tofay/renamed-rust-crates branch from 71c0c4d to 82471ce Compare February 2, 2022 09:05
@tofay tofay force-pushed the tofay/renamed-rust-crates branch from 2dece0c to efd57fd Compare February 2, 2022 09:38
@tofay
Copy link
Contributor Author

tofay commented Feb 2, 2022

No problem, I've rebased.

@JamieMagee
Copy link
Member

Thanks, this all looks good to me.

We recently moved our integration tests into this repo as well. Could you plese add a test case here as well?

I'll approve in the meantime, so we can merge this soon after.

Signed-off-by: Tom Fay <tomfay@microsoft.com>
@tofay
Copy link
Contributor Author

tofay commented Feb 3, 2022

I've updated the standard verification test to have a renamed dependency.

@JamieMagee JamieMagee enabled auto-merge (squash) February 3, 2022 16:33
@JamieMagee JamieMagee merged commit 956c84b into main Feb 3, 2022
@JamieMagee JamieMagee deleted the tofay/renamed-rust-crates branch February 3, 2022 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

detector:rust The Rust Cargo detector

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants