bazelbuild / bazelbuild/rules_rust
crates_repository: how to define a crate twice with a different set of features ?
- Dominant language
- Starlark
- Stars
- 843
- Forks
- 651
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 15
Description
:wave:
Is there a way to define a crate multiple times with a different set of features ?
I tried something like that but it seems that the crate is filtered out.
```
crates_repository(
...
packages = {
"tonic-tls": crate.spec(
features = ["tls"],
package = "tonic",
version = "0.8",
),
"tonic": crate.spec(
version = "0.8",
),
}
)
❯ bazel query @crate_index//... | grep tonic
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
# no more tonic dependency
```
Let me know it it's the right way to do it
Contributor guide
Assessment
This issue has not been assessed yet.