Commit 8bdd785
authored
fix: Duplicate aliases generated in rendering when two crates of the same version (#3386)
Original cause:
5e90483#diff-52bdc04b030a02035a19a3c805288b7720191185a18f6b8f16f61a59baa42d3fR224
Related to: #3215
This PR updates rendering in `cargo-bazel` to handle the case when there
are multiple dependencies on a crate at the same version, but they're
aliased. For example, when a `Cargo.toml` has the following:
```
itertools = "0.11.24"
itertools_other = { version = "0.11.24", package = "itertools" }
```
Previously this would generate two aliases both with the name
`itertools-0.11.24` but now we only create a single alias of that name.
Encountering this case is odd but not uncommon, especially if you also
use a tool like
[`cargo-hakari`](https://github.com/guppy-rs/guppy/tree/main/tools/cargo-hakari)
in your workspace.1 parent 8f118ee commit 8bdd785
File tree
360 files changed
+2554
-916
lines changed- cargo/private/cargo_toml_info/3rdparty/crates
- crate_universe
- 3rdparty/crates
- src
- examples/crate_universe
- vendor_external/crates
- vendor_local_manifests/crates
- backtrace-0.3.74
- errno-0.3.11
- getrandom-0.3.2
- libc-0.2.171
- lock_api-0.4.12
- miniz_oxide-0.8.7
- object-0.36.7
- once_cell-1.21.3
- parking_lot_core-0.9.10
- proc-macro2-1.0.94
- rustix-1.0.5
- socket2-0.5.9
- tempfile-3.19.1
- tokio-1.44.1
- windows_aarch64_gnullvm-0.52.6
- windows_aarch64_msvc-0.52.6
- windows_i686_gnu-0.52.6
- windows_i686_gnullvm-0.52.6
- windows_i686_msvc-0.52.6
- windows_x86_64_gnu-0.52.6
- windows_x86_64_gnullvm-0.52.6
- windows_x86_64_msvc-0.52.6
- wit-bindgen-rt-0.39.0
- vendor_local_patching
- forked/getrandom
- vendor/libc-0.2.141
- vendor_local_pkgs/crates
- backtrace-0.3.74
- httparse-1.10.1
- hyper-0.14.32
- libc-0.2.171
- lock_api-0.4.12
- log-0.4.27
- miniz_oxide-0.8.7
- object-0.36.7
- once_cell-1.21.3
- parking_lot_core-0.9.10
- proc-macro2-1.0.94
- serde-1.0.219
- serde_json-1.0.140
- slab-0.4.9
- socket2-0.5.9
- thread_local-1.1.8
- tokio-1.44.1
- tracing-0.1.41
- tracing-core-0.1.33
- tracing-log-0.2.0
- valuable-0.1.1
- winapi-0.3.9
- winapi-i686-pc-windows-gnu-0.4.0
- winapi-x86_64-pc-windows-gnu-0.4.0
- windows_aarch64_gnullvm-0.52.6
- windows_aarch64_msvc-0.52.6
- windows_i686_gnu-0.52.6
- windows_i686_gnullvm-0.52.6
- windows_i686_msvc-0.52.6
- windows_x86_64_gnu-0.52.6
- windows_x86_64_gnullvm-0.52.6
- windows_x86_64_msvc-0.52.6
- vendor_remote_manifests/crates
- vendor_remote_pkgs/crates
- extensions
- bindgen/3rdparty/crates
- mdbook/private/3rdparty/crates
- prost/private/3rdparty/crates
- protobuf/3rdparty/crates
- wasm_bindgen/3rdparty/crates
- test/rust_analyzer/3rdparty/crates
- tools/rust_analyzer/3rdparty/crates
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
360 files changed
+2554
-916
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
143 | 146 | | |
144 | 147 | | |
145 | 148 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments