rust-lang / rust-lang/cargo

Functionality to glob all crates in workspace when mixed with other content

Open
#4,593 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-workspaces C-bug S-needs-design
Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
23h 30m
Merged PRs (30d)
51

Description

We added glob support originally with #3911

However, if we add to Cargo.toml

[workspace]
members = ["**/*"]

Then we get an error like this.

error: failed to read `/Users/nipunn/src/client/rust/.cargo/Cargo.toml`

Here, the */ matches over aggressively to directories/files that aren't Crates. It would be nice to have a way to glob all crates. For now, we have to autogenerate the workspace Cargo.toml with a script.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior with a Cargo.toml containing [workspace] members = ["**/*"], then read the existing glob support introduced in issue #3911. Done means workspace globbing can find all crates without attempting to read non-crate files or directories such as .cargo/Cargo.toml.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.