bazelbuild / bazelbuild/rules_rust

crate_universe unable to use Cargo workspaces with globbed members

Open
#1,199 5 comments 1 reaction 0 assignees View on GitHub
crate-universe needs-triage
Dominant language
Starlark
Stars
843
Forks
651
Avg merge
2d 18h
Merged PRs (30d)
15

Description

Given a workspace defined in `Cargo.toml` as:
```toml
[workspace]
members = ["crates/*"]
```
`crate_universe` is unable to build crates as it seems to parse the `crates/*` string as the name of a member, and complains that this crate's manifest is not properly included as such:
```
Error: Some manifests are not being tracked. Please add the following labels to the `manifests` key: {
":crates/*/Cargo.toml",
}
```

I think it's a separate issue in that the `manifests` attribute of the `crates_repository` rule cannot accept a glob pattern so perhaps there isn't an easy fix for this, but the error message could be more clear to indicate that the workspace members must be explicitly listed out in `Cargo.toml`

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.