/bazel-cargo-raze-duplicated-dep

Demo for cargo raze duplicate dep problem

Primary LanguageStarlarkMIT LicenseMIT

Bazel Cargo Raze Duplicate Deps Problem

A simple dependency to the sha-1 crate fails to compile (at least on OSX), due to the platform specific deps in cpufeatures.

$ bazel test //... --sandbox_debug --verbose_failures
ERROR: [clip]/external/raze__cpufeatures__0_2_1/BUILD.bazel:34:13: Label '@raze__libc__0_2_107//:libc' is duplicated in the 'deps' attribute of rule 'cpufeatures'
ERROR: [clip]/external/raze__sha_1__0_9_8/BUILD.bazel:47:13: Target '@raze__cpufeatures__0_2_1//:cpufeatures' contains an error and its package is in error and referenced by '@raze__sha_1__0_9_8//:sha1'

Solution: Adding Targets

After adding these:

targets = [
    "x86_64-apple-darwin",
    "x86_64-pc-windows-msvc",
    "x86_64-unknown-linux-gnu",
    "aarch64-linux-android",
    "wasm32-unknown-unknown",

the issue does go away.