Skip to content

override "current package believes it's in a workspace" #5418

@durka

Description

@durka

If you create a crate inside another one, sometimes you get the above quoted error when trying to build it.

As far as I can tell, there's no solution. You can never build the crate because it's not really in the workspace, yet you can't build it separately either. The only recourse is to move the whole thing to another directory.

I propose a new flag, called something like --no-workspace or --believe-nothing--reality-is-fake--just-build-here, that would ignore the surrounding workspace and build the crate as it would have done before workspaces were invented. Does this make sense?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions