Skip to content

Regression from 1.39.0 to 1.40.0: --no-default-features is not allowed in the root of a virtual workspace #7727

Closed
@jplatte

Description

@jplatte

Problem

In virtual workspaces, cargo check -p subproject --no-default-features used to work up until 1.39.0 (although AFAICT now it didn't at all do what I intended) and since 1.40.0 results in:

error: --no-default-features is not allowed in the root of a virtual workspace

Probably related to #5364.

Notes

On nightly, this can be worked around by adding -Z package-features. However, I'm testing on stable and if I understand #5364 correctly, 1.39.0 didn't do the right thing anyway*. So I'll update my CI script to cd into the subproject directory and run without -p from there from now on.

* AFAICT it probably enabled the default feature since another workspace package required it even though I passed --no-default-features. This should really have resulted in a warning...

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions