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

Update to the latest semver #2990

Merged
merged 2 commits into from
Nov 20, 2020
Merged

Update to the latest semver #2990

merged 2 commits into from
Nov 20, 2020

Conversation

jtgeibel
Copy link
Member

The new release of semver treats >= 0 the same as the * wildcard.
It makes sense that these are equivalent, but this did break 3 tests
and will technically reject syntax in Cargo.toml that was previously
accepted.

r? @ghost

@bors
Copy link
Contributor

bors commented Nov 12, 2020

☔ The latest upstream changes (presumably #3023) made this pull request unmergeable. Please resolve the merge conflicts.

Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

The new release of semver treats `>= 0` the same as the `*` wildcard.
It makes sense that these are equivalent, but this did break 3 tests
and will technically reject syntax in `Cargo.toml` that was previously
accepted.
@jtgeibel
Copy link
Member Author

I've rebased and updated the error message. I've also run the following commands to determine crates already using a >= 0 constraint.

$ cd ~/.cargo/registry/index/gh.neting.cc-1ecc6299db9ec823/
$ git grep --count '">= 0"' origin/master
origin/master:as/ki/askii:1
origin/master:co/ar/coarsetime:7
origin/master:co/un/count-min-sketch:2
origin/master:cu/rl/curl-sys:31
origin/master:cu/rs/cursive_buffered_backend:4
origin/master:do/h-/doh-proxy:8
origin/master:ju/mp/jumphash:4
origin/master:li/bg/libgit2-sys:38
origin/master:li/bs/libssh2-sys:16
origin/master:na/ts/nats:5
origin/master:pr/iv/privdrop:5
origin/master:vm/-m/vm-memory:2
$ git grep --count '">=0"' origin/master
origin/master:js/on/jsonschema:1
origin/master:vm/-m/vm-memory:5

I've checked the index for all of these, and jsonschema and vm-memory are the only 2 crates where the latest release uses the bad constraint. jsonschema has a dev-dependency on mockito >=0 and vm-memory a dev-dependency on matches >=0.

r? @pietroalbini

@pietroalbini
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Nov 20, 2020

📌 Commit 4819d90 has been approved by pietroalbini

@bors
Copy link
Contributor

bors commented Nov 20, 2020

⌛ Testing commit 4819d90 with merge cdf6915...

@bors
Copy link
Contributor

bors commented Nov 20, 2020

☀️ Test successful - checks-actions
Approved by: pietroalbini
Pushing cdf6915 to master...

@bors bors merged commit cdf6915 into rust-lang:master Nov 20, 2020
@jtgeibel jtgeibel deleted the update/semver branch November 21, 2020 23:25
@dtolnay
Copy link
Member

dtolnay commented Nov 27, 2020

Is it possible that this update regressed the rendering of dependency version requirements? #3047

@Turbo87
Copy link
Member

Turbo87 commented Nov 27, 2020

that does seem likely, yeah. certainly not an intentional change. 😞

jtgeibel added a commit to jtgeibel/crates.io that referenced this pull request Nov 27, 2020
…roalbini"

This reverts commit cdf6915, reversing
changes made to 6e7b63a.
bors added a commit that referenced this pull request Nov 27, 2020
Revert "Auto merge of #2990 - jtgeibel:update/semver, r=pietroalbini"

This reverts commit cdf6915, reversing
changes made to 6e7b63a.

I'll r+ once CI is green
r? `@ghost`
bors added a commit that referenced this pull request Dec 14, 2020
Save original dependency requirement string in the database when publishing

This PR should resolve #3047 by saving the original dependency requirement string in the database when publishing, and returning the original string too when calling the `GET /crates/:crate_id/:version/dependencies` endpoint.

Before #2990 we were turning `1.2.3` into `^1.2.3` automatically. After that PR were turning it into `>=1.2.3, <2.0.0`, and now, with this PR, we would keep it at `1.2.3` and it would be up to the API client to prefix the `^`, if necessary.

r? `@jtgeibel`

/cc `@dtolnay`
jtgeibel added a commit to jtgeibel/crates.io that referenced this pull request Feb 26, 2021
This reverts commit 0bcb724.

This reverts the revert (rust-lang#3051) of rust-lang#2990. Now that rust-lang#3047 is resolved by
rust-lang#3094, it should be fine to bump this again.
jtgeibel added a commit to jtgeibel/crates.io that referenced this pull request Feb 26, 2021
This reverts commit 0bcb724.

This reverts the revert (rust-lang#3051) of rust-lang#2990. Now that rust-lang#3047 is resolved by
jtgeibel added a commit to jtgeibel/crates.io that referenced this pull request Feb 27, 2021
This (partially) reverts commit 0bcb724.

This partially reverts the revert (rust-lang#3051) of rust-lang#2990. While we can't bump
the version yet, it is worth recovering these changes and documenting
the remaining work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants