Skip to content

confusing error message when cargo build --all is run in the root of an empty virtual workspace #3966

@shahn

Description

@shahn

I have a virtual workspace with a bunch of crates beneath it. The documentation states that that specifying members in the manifest is optional, and membership will be inferred if it's missing. This seems to be incorrect, as running cargo build --all in such a setup fails with the message manifest path <path/to>/Cargo.toml is a virtual manifest, but this command requires running against an actual package in this workspace. Compiling a crate beneath the root directory also gives the error message that the crate believes it is in a workspace, but it's not listed in members. I think the easiest fix is to clearly state that members is not in fact optional at all if you have any actual members, but the error message should also probably be improved to say that we simply didn't find any workspace members to build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions