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

Save original dependency requirement string in the database when publishing #3049

Merged
merged 5 commits into from
Dec 14, 2020

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Nov 27, 2020

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

@Turbo87 Turbo87 added the C-bug 🐞 Category: unintended, undesired behavior label Nov 27, 2020
@bors
Copy link
Contributor

bors commented Nov 27, 2020

☔ The latest upstream changes (presumably #3051) 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

@bors
Copy link
Contributor

bors commented Dec 2, 2020

☔ The latest upstream changes (presumably #3062) 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

@bors
Copy link
Contributor

bors commented Dec 13, 2020

☔ The latest upstream changes (presumably #3066) 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

@jtgeibel
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Dec 13, 2020

📌 Commit 815a218 has been approved by jtgeibel

@bors
Copy link
Contributor

bors commented Dec 13, 2020

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout semver-req (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self semver-req --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging src/tests/krate/publish.rs
Auto-merging src/models/dependency.rs
CONFLICT (content): Merge conflict in src/models/dependency.rs
Automatic merge failed; fix conflicts and then commit the result.

@Turbo87
Copy link
Member Author

Turbo87 commented Dec 14, 2020

@bors r=jtgeibel

@bors
Copy link
Contributor

bors commented Dec 14, 2020

📌 Commit c50c536 has been approved by jtgeibel

@bors
Copy link
Contributor

bors commented Dec 14, 2020

⌛ Testing commit c50c536 with merge 75563da...

@bors
Copy link
Contributor

bors commented Dec 14, 2020

☀️ Test successful - checks-actions
Approved by: jtgeibel
Pushing 75563da to master...

@bors bors merged commit 75563da into rust-lang:master Dec 14, 2020
@Turbo87 Turbo87 deleted the semver-req branch December 14, 2020 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug 🐞 Category: unintended, undesired behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression in rendering of dependency version requirements
4 participants