-
Notifications
You must be signed in to change notification settings - Fork 105
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
Duplicated alias rule in generated BUILD file #474
Comments
I took a look at the source code; it looks like the generated BUILD file by default iterates thru the package names from the flat list of However, since package A here is a workspace member and not a binary, it get skipped here, and the renaming context from resolve graph is lost -- so the final generated BUILD file contains the original package name. |
Here's a re-pro of the scenario described where the renaming is not honored in the generated aliases: https://github.com/jgao54/cargo-raze-example |
I also see this issue. |
Hello, I have an existing project that uses cargo workspace and I am converting it to build with Bazel; and I am using cargo-raze (v0.15.0) in Remote mode.
There are two packages: A and B.
A's Cargo.toml contains:
B's Cargo.toml contains:
After running cargo raze, both versions are populated in the generated BUILD.bazel file with the same name:
Because of this, the project failed to build with:
Temporary workaround is to manually edit the BUILD.bazel file and remove one of the aliases.
I also tried to rename clap in A's cargo.toml (i.e.
clap3 = {package = "clap", version = "3.0.14"}
), however it did not affect the generated BUILD.bazel file.(I saw #282 and #425, and thought this was fixed, but not familiar enough with cargo-raze to deduce why it didn't propagate the renaming)
The text was updated successfully, but these errors were encountered: