crate-ci / cargo-release

Cargo subcommand `release`: everything about releasing a rust crate.
Apache License 2.0
1.33k stars 112 forks source link

`cargo release version --dependent-version` gives an invalid argument error #690

Open teor2345 opened 1 year ago

teor2345 commented 1 year ago

When I run cargo release version --dependent-version fix patch, I get this error:

error: unexpected argument '--dependent-version' found

  tip: to pass '--dependent-version' as a value, use '-- --dependent-version'

Usage: cargo release version [OPTIONS] <LEVEL|VERSION>

But when I run cargo release --dependent-version fix patch, it works fine.

epage commented 1 year ago

Looks like its not supported (see cargo release version -h and not seeing a reason listed in #530 which added the version subcommand.

My suspicion is that its because cargo set-version (from cargo-edit) hard codes the behavior and wanting to push people in that direction in case to better understand the requirements around it.

teor2345 commented 1 year ago

Currently we're using cargo release --no-publish --no-verify --no-tag --no-push --dependent-version fix as a workaround, but it still does a whole bunch of steps we don't want.

But I don't think --dependent-version fix or update will work for us anyway, because they change the versions in all dependent crates in the workspace.

We're actually looking for a workaround for a verification error caused by dependencies on unpublished crate versions. For the crates that errored, we set their dependencies to a published version, which fixes the errors. But then cargo update version goes and undoes that!

(I'll open a separate ticket for the actual error.)