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

Publish test crates #13418

Merged
merged 9 commits into from
Mar 26, 2024
Merged

Publish test crates #13418

merged 9 commits into from
Mar 26, 2024

Conversation

PaulDance
Copy link
Contributor

What does this PR try to resolve?

This is an attempt to close #10147. In short, publish the cargo-test-(macro|support) crates to crates.io.

Main parts:

  • Updating the concerned manifests to make the packages publishable.
  • Adding them to publish.py: not sure if you want this to be done. I put them after all other packages and in reverse-dependency order to ensure things will work the best, hopefully.
  • Updating the contribution documentation to reflect the change. I didn't see any other place where the crates' publication was mentioned.

How should we test and review this PR?

Sadly, the effective testing could not be done by me as it would require publishing the crates, which would block future publications by Cargo team members and therefore render the whole point of this impossible or cumbersome. Hopefully, the PR is small and readable enough that mistakes can be seen easily. The real testing would need to be done manually by some team member either before by checking the source branch out or after merging.

The only testing I was able to perform was to run cargo publish --dry-run -p cargo-test-(macro|support). The first worked just fine. The second failed on the crates-io package not being available on crates.io in version 0.40.0. However, the package is in this version in the current sources. I therefore suspect that a run of publish.py should work since the packages have been added there after crates-io.

Additional information

This is very much tentative and open to discussion. I tried my best to update things as I understood them. Please correct me on anything I would have done wrong or simply not thought of.

@rustbot
Copy link
Collaborator

rustbot commented Feb 7, 2024

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or
reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-documenting-cargo-itself Area: Cargo's documentation A-infrastructure Area: infrastructure around the cargo repo, ci, releases, etc. A-testing-cargo-itself Area: cargo's tests S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 7, 2024
@PaulDance
Copy link
Contributor Author

Added a fix to make ci/validate-version-bump.sh work: bump the crate versions.

However, the test still fails on: Error: cargo-test-support not found in registry (crates.io). This is correct, but temporary. It should work as soon as the crates have been published at least once. How should we proceed about this? Have someone manually publish them?

@bors
Copy link
Collaborator

bors commented Feb 27, 2024

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

Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, the test still fails on: Error: cargo-test-support not found in registry (crates.io)

We might want to do something like this, until we publish a version

633929d#diff-017fb78a9378b299832fb9eadf0e7b8c60ecca480f2415a168e1b48a5b6f3486

crates/cargo-test-macro/Cargo.toml Outdated Show resolved Hide resolved
crates/cargo-test-macro/Cargo.toml Outdated Show resolved Hide resolved
crates/cargo-test-support/Cargo.toml Outdated Show resolved Hide resolved
crates/cargo-test-support/Cargo.toml Outdated Show resolved Hide resolved
crates/cargo-test-macro/Cargo.toml Outdated Show resolved Hide resolved
@weihanglo
Copy link
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 24, 2024
Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
Marks the crates as publishable.

Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
…sion-bump.sh pass

Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
…heck pass

Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
…I check pass

Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
As discussed in #10147.

Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
@PaulDance
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. labels Mar 26, 2024
@weihanglo
Copy link
Member

Cool. We're all set. Thanks Paul!

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 26, 2024

📌 Commit f422e96 has been approved by weihanglo

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 26, 2024
@bors
Copy link
Collaborator

bors commented Mar 26, 2024

⌛ Testing commit f422e96 with merge 3a77350...

@bors
Copy link
Collaborator

bors commented Mar 26, 2024

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing 3a77350 to master...

1 similar comment
@bors
Copy link
Collaborator

bors commented Mar 26, 2024

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing 3a77350 to master...

@bors bors merged commit 3a77350 into rust-lang:master Mar 26, 2024
23 checks passed
@bors
Copy link
Collaborator

bors commented Mar 26, 2024

👀 Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request.

@PaulDance PaulDance deleted the publish-test-crates branch March 27, 2024 12:02
@PaulDance
Copy link
Contributor Author

@weihanglo Thank you!

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2024
Update cargo

8 commits in 499a61ce7a0fc6a72040084862a68b2603e770e8..a59aba136aab5510c16b0750a36cbd9916f91796
2024-03-26 04:17:04 +0000 to 2024-03-28 21:21:41 +0000
- refactor(package): Simplify getting of published Manifest (rust-lang/cargo#13666)
- fix(toml): Warn on unused workspace.dependencies keys on virtual workspaces (rust-lang/cargo#13664)
- docs: clarify `--locked` ensures Cargo uses dependency versions in lockfile (rust-lang/cargo#13665)
- RUSTC_WORKSPACE_WRAPPER: clarify docs (rust-lang/cargo#13648)
- fix(add): Preserve comments when updating simple deps (rust-lang/cargo#13655)
- fix(generate-lockfile): hold lock before querying index (rust-lang/cargo#13657)
- test: Add asserts to catch BorrowMutError's (rust-lang/cargo#13651)
- Publish test crates (rust-lang/cargo#13418)

r? ghost
@rustbot rustbot added this to the 1.79.0 milestone Mar 30, 2024
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Mar 30, 2024
Update cargo

8 commits in 499a61ce7a0fc6a72040084862a68b2603e770e8..a59aba136aab5510c16b0750a36cbd9916f91796
2024-03-26 04:17:04 +0000 to 2024-03-28 21:21:41 +0000
- refactor(package): Simplify getting of published Manifest (rust-lang/cargo#13666)
- fix(toml): Warn on unused workspace.dependencies keys on virtual workspaces (rust-lang/cargo#13664)
- docs: clarify `--locked` ensures Cargo uses dependency versions in lockfile (rust-lang/cargo#13665)
- RUSTC_WORKSPACE_WRAPPER: clarify docs (rust-lang/cargo#13648)
- fix(add): Preserve comments when updating simple deps (rust-lang/cargo#13655)
- fix(generate-lockfile): hold lock before querying index (rust-lang/cargo#13657)
- test: Add asserts to catch BorrowMutError's (rust-lang/cargo#13651)
- Publish test crates (rust-lang/cargo#13418)

r? ghost
@PaulDance
Copy link
Contributor Author

@weihanglo Do you have any news about this? The version currently uploaded is still 0.1.0 and empty while the ownership transfer seems to have been accepted. Isn't running publish.py part of the usual Cargo team workflow? Does it actually not work for cargo-test-*?

@weihanglo
Copy link
Member

rustbot added this to the 1.79.0 milestone

member crates have the same release schedule as the main Cargo binary / library.

See https://doc.crates.io/contrib/process/release.html#cratesio-publishing

@PaulDance
Copy link
Contributor Author

PaulDance commented May 26, 2024

Woops, sorry. Got it, thanks!

@PaulDance
Copy link
Contributor Author

Just popping in to say that I've now switched to it and it works great, thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documenting-cargo-itself Area: Cargo's documentation A-infrastructure Area: infrastructure around the cargo repo, ci, releases, etc. A-testing-cargo-itself Area: cargo's tests S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

release cargo test helper crate to crates-io
5 participants