Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crates-io 0.36.1 breaks semver #12354

Closed
lu-zero opened this issue Jul 13, 2023 · 7 comments · Fixed by #12357
Closed

crates-io 0.36.1 breaks semver #12354

lu-zero opened this issue Jul 13, 2023 · 7 comments · Fixed by #12357
Labels
C-bug Category: bug S-triage Status: This issue is waiting on initial triage.

Comments

@lu-zero
Copy link
Contributor

lu-zero commented Jul 13, 2023

Problem

At least rust_version got added to NewCrate.

Steps

Open 0.36.0 and 0.36.1 and compare.

Possible Solution(s)

yank 0.36.1 and release it as 0.37.0

Notes

No response

Version

No response

@pietroalbini
Copy link
Member

Yanked cargo 0.72.0 and crates-io 0.36.1, until the Cargo team decides how to handle this.

@obi1kenobi
Copy link
Contributor

👋 I noticed this via the rust-lang Zulip, I'm the maintainer of cargo-semver-checks.

Any interest in adopting cargo-semver-checks for the lib crates in this repo? If so, I'd be happy to help!

It's designed to be runnable as cargo semver-checks && cargo publish and one of its existing lints would have flagged and prevented this accidental semver break:

     Parsing crates-io v0.36.1 (current)
     Parsing crates-io v0.36.0 (baseline)
    Checking crates-io v0.36.0 -> v0.36.1 (minor change)
   Completed [   0.015s] 39 checks; 38 passed, 1 failed, 6 unnecessary

--- failure constructible_struct_adds_field: externally-constructible struct adds field ---

Description:
A pub struct constructible with a struct literal has a new pub field. Existing struct literals must be updated to include the new field.
        ref: https://doc.rust-lang.org/reference/expressions/struct-expr.html
       impl: https://github.com/obi1kenobi/cargo-semver-check/tree/v0.22.1/src/lints/constructible_struct_adds_field.ron

Failed in:
  field NewCrate.rust_version in /.../cargo/crates/crates-io/lib.rs:60
       Final [   0.015s] semver requires new major version: 1 major and 0 minor checks failed

You can replicate this output locally right now by running cargo semver-checks --baseline-version 0.36.0 from the directory containing the crates-io manifest.

@epage
Copy link
Contributor

epage commented Jul 13, 2023

@obi1kenobi we are slowly working towards that. Our release process is a bit scattered and we need to carefully improve our release process to not have unintended affects

e.g. one simple step we've taken is to prevent accidentally forgetting to prep a crate for release. See #12352 as an example where CI caught an "issue" (strictly speaking, that change doesn't need to be released but oh well)

@obi1kenobi
Copy link
Contributor

Makes sense, thanks for the context! Let me know if I can do anything to help. If it'd be useful, I'd be happy to try plugging in the cargo-semver-checks GitHub Action into the CI pipeline you pointed me to in the linked PR.

bors added a commit that referenced this issue Jul 13, 2023
Bump version of crates-io due to unintentional semver-breaking change

r? `@weihanglo`

Fixes #12354
bors added a commit that referenced this issue Jul 13, 2023
[beta-1.72] Bump version of crates-io due to unintentional semver-breaking change

r? `@weihanglo`

Fixes #12354
@bors bors closed this as completed in 4bbb300 Jul 13, 2023
@jessebraham
Copy link

Is there an ETA for [email protected]?

@ehuss
Copy link
Contributor

ehuss commented Jul 17, 2023

There is no ETA, we are currently waiting on getting someone with permissions to publish. Hopefully soon!

@pietroalbini
Copy link
Member

Published the crates and a new git tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants