bazelbuild / bazelbuild/rules_rust

Optional dependencies not respected in bzlmod

Open
#2,779 1 comment 0 reactions 0 assignees View on GitHub
awaiting-response bzlmod crate-universe
Dominant language
Starlark
Stars
843
Forks
651
Avg merge
2d 18h
Merged PRs (30d)
15

Description

Hello,
I have a non cargo setup via bzlmod. When i set `default_features= False` in crate.spec, the rust_library target generated in the crate's BUILD file still has dependencies that should only be set when that specific feature is present.

This can sometimes massively increase build time when the crate has a lot of optional feature-based dependencies.
If it helps, I can create a reproduction repo?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.