google / cargo-raze

Generate Bazel BUILD from Cargo dependencies!
Apache License 2.0
480 stars 104 forks source link

Regression in 0.13.0 adds aliases for ALL crate dependencies in a workspace, instead of for just the current package #479

Open joell opened 2 years ago

joell commented 2 years ago

In cargo raze 0.12.0, when generating Bazel rules for a workspace of multiple packages, the BUILD.bazel file for each package has alias rules for just the dependencies of that package.

In cargo raze 0.13.0, this behavior changed to add aliases for all the dependencies of every package in the workspace.

This causes Bazel alias conflicts when two packages within the workspace depend on different major versions of a crate (e.g., clap 2.x vs 3.x). In such cases, the Bazel project can no longer build.

It is possible that issue #474 might be reflecting this deeper problem.