Skip to content

cargo install in a workspace gives confusing errors #7599

@Firstyear

Description

@Firstyear

Problem

Running cargo install in a workspace gives a confusing error:

error: found a virtual manifest at `/Users/william/development/rsidm/Cargo.toml` instead of a package manifest

Attempting to use a manifest (which is what the common google searches tell you to do) also errors:

 cargo install --manifest-path kanidm_tools/Cargo.toml
error: Found argument '--manifest-path' which wasn't expected, or isn't valid in this context

This is because all the current online uses seem to be cargo build not cargo install (is anyone installing anything?).

As well, the other suggested option is --all: which also fails:

cargo install --all
error: Found argument '--all' which wasn't expected, or isn't valid in this context
	Did you mean --all-features?

Steps

  1. create a workspace with multiple members.
  2. in the workspace run "cargo install"

Possible Solution(s)
cargo install in a workspace could

  • give a better or constructive error such as "did you mean to use --path"?
  • make --all mean something
  • just work by default (install all binaries of the workspace)

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-workspacesArea: workspacesC-bugCategory: bugCommand-installS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions