Skip to content

--no-dev-deps flag edits real manifest #15

Closed
@taiki-e

Description

@taiki-e

Using --no-dev-deps flag is recommended to avoid rust-lang/cargo#4866 if resolver = "2" doesn't set.

However, currently, using --no-dev-deps flag removes dev deps from real manifest while cargo-hack is running and restores it when finished.
If possible, this should be done without editing the manifest.

Workaround

Using unstable -Z features=dev_dep (rust-lang/cargo#7916) or -Z avoid-dev-deps (rust-lang/cargo#5133) instead of --no-dev-deps.

Note:
-Z avoid-dev-deps works well with cargo check/build/run/install, but not with cargo publish.
On the other hand, --no-dev-deps doesn't work well with cargo install.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-dev-depsArea: dev-dependencies (--no-dev-deps, --remove-dev-deps, etc.)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions