Open
Description
I’m trying to build a rust binary, that has some optional dependencies in the Cargo.toml, for my configuration I want to use these optional dependencies.
But it looks like the optional dependencies are not even fetched, and not added to the “@crate_index” repository.
That means that even if I specify them explicitly in the rust_binar binary:
rust_binary(
name = "gui",
srcs = glob(["src/**/*.rs"]),
deps = all_crate_deps() + [
"@crate_index//:astc-decode",
],
)
they can not be used:
ERROR: /Users/evgenypetrov/work/bazel_playground/rust/gui/BUILD.bazel:5:12: no such target '@crate_index//:astc-decode': target 'astc-decode' not declared in package '' defined by /private/var/tmp/_bazel_evgenypetrov/0e70737357a2a67453272d7916c8876e/external/crate_index/BUILD.bazel (Tip: use `query "@crate_index//:*"` to see all the targets in that package) and referenced by '//rust/gui:gui'
ERROR: Analysis of target '//rust/gui:gui' failed; build aborted: Analysis failed
Here is the repo, that reproduces the problem