rust-marker / marker

An experimental linting interface for Rust. Let's make custom lints a reality
https://rust-marker.github.io/marker/
Other
144 stars 11 forks source link

Remove params that aren't supported by `cargo release publish` #321

Closed Veetaha closed 12 months ago

Veetaha commented 12 months ago

I was confused by this warning on CI

It looked to me as if cargo release wanted to do a commit and push changes to the remote. I still don't understand why that warning is emitted because cargo release is used only for publishing. Maybe that's a micro-bug in cargo-release. Anyway, this time it was me who broke crates publishing. Hopefully, this was the last obstacle

Veetaha commented 12 months ago

Btw, I think you should release the 0.4.2 crates manually, just one more time to make the github-action-test jobs pass. Now they fail on:

  × Lint crate marker_lints uses the version of marker_api 0.4.1 that is incompatible with the version of marker_api 0.4.2 used in the
  │ driver
  help: update either the marker_api dependency in marker_lints or update the driver to the latest version
xFrednet commented 12 months ago

Hmm, I've installed cargo-release v0.25.0 by running cargo install cargo-release, checkout out the v0.4.2 tag and ran the command from this PR and got an error:

logs which are no longer important ``` $ cargo release publish --no-confirm --no-verify --allow-branch '*' warning: push target `origin/HEAD` doesn't exist Publishing marker_error Updating crates.io index Packaging marker_error v0.4.2 (/home/xfrednet/workspace/rust/marker/marker_error) Packaged 7 files, 58.3KiB (12.7KiB compressed) Uploading marker_error v0.4.2 (/home/xfrednet/workspace/rust/marker/marker_error) warning: aborting upload due to dry run Publishing cargo_marker Updating crates.io index Packaging cargo_marker v0.4.2 (/home/xfrednet/workspace/rust/marker/cargo-marker) Updating crates.io index error: failed to prepare local package for uploading Caused by: failed to select a version for the requirement `marker_error = "^0.4.2"` candidate versions found which didn't match: 0.4.1, 0.4.0, 0.3.0, ... location searched: crates.io index required by package `cargo_marker v0.4.2 (/home/xfrednet/workspace/rust/marker/cargo-marker)` if you are looking for the prerelease package it needs to be specified explicitly marker_error = { version = "0.3.0-dev" } perhaps a crate was updated and forgotten to be re-vendored? ```

The reference to marker_error = { version = "0.3.0-dev" } confuses me. I also can't find any references to it, when searching for 0.3.0 or marker_error in the repo. Do you have an idea, where this could come from?

Edit 1: Maybe nevermind, this is still a try run for some reason :thinking:

Edit 2: Year running it with --execute works. This was probably a change from the version of cargo-release we use in the repo, which is 0.24.11

Veetaha commented 12 months ago

The line marker_error = { version = "0.3.0-dev" } is just a useless "help message". The actual error is:

  failed to select a version for the requirement `marker_error = "^0.4.2"`
  candidate versions found which didn't match: 0.4.1, 0.4.0, 0.3.0, ...

Maybe the "dry run" mode of cargo release doesn't take into account that this package would be uploaded as part of the same release command. Probably because cargo package requires the crates to be published during packaging

xFrednet commented 12 months ago

Yup, everything worked now. Guess this leaves the question, if we want to update the cargo-release version of our CI to v0.25^. We can also merge the PR as is :)

Veetaha commented 12 months ago

Updated cargo release version, thanks