-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
release cargo test helper crate to crates-io #10147
Comments
Do you mean the cargo-test-support or cargo-test-macro crates? They seam pretty customized to our needs. I would love to see how they could be used for your projects. They should be available as git dependencies. Would you be willing to try using them as git dependencies and link us a PR to show how it works for you? If they turn out to be useful we would still have to agree to what the stability guarantee is. Updating and publishing another set of crates is a nontrivial amount of work. For Cargo's Rust API, we release a new and incompatible version of the library every six weeks. For other crates we put in the effort to track when breaking changes actually occur. So what the release cadence is will need to be figured out. |
For now these crates are not raelly intended for wider consumption. You're welcome, as with all open source, to fork it and customize it for your needs as well. Otherwise though I don't think we want to manage publication of these crates on crates.io. |
would it be possible to re-visit this with a slightly different rationale? over in the Debian packaging ecosystem, cargo is actually packaged twice:
the former uses the source tarball published upstream and vendors all the dependencies (with some scripts to remove stuff that is not needed for the purpose of packaging cargo the tool for Debian usage), to avoid the bootstrap cycle of cargo requiring various crates that in turn also require cargo to build. this is basically an excemption that cargo as toolchain package has from the general Debian rule of "no vendoring/code copies". as part of this build, the cargo testsuite is executed. the latter uses the same tooling as all regular crates packaged for Debian - obtain the source from crates.io, transform Cargo.toml into Debian package and CI metadata, etc.pp.. there are some other crates (most notable, the crate responsible for this transformation, which is called would it be possible to re-consider publishing cargo-test-support and cargo-test-macro (with the same "eternally-unstable" version number as cargo the lib crate itself)? I know this is a pretty niche use case, but IMHO it's a valid one nevertheless.. |
Personally, I think this is worth us reconsidering. As a cargo team member, I find it frustrating that we do not publish this as it'd be a big help for me for browsing the documentation (I tend to prefer docs.rs over I also have a couple of tools now (cargo-edit, cargo-release) that are using it via a git dependency. |
are there any blockers for this? |
The doc we currently have is on https://doc.rust-lang.org/nightly/nightly-rustc/cargo_test_support/index.html.
Speaking of publishing this to crates.io. Cargo the project has gained a better support of managing member packages since last year (kudos to cargo-semver-checks and workspace-inheritance feature 😃). I am on the side that we can just publish those two crates with minimal efforts. Yet, the API is not and may never be stable. |
Same for me, although only one. Having it published would be more comfortable, for sure. It would also help in circumventing #10752 specifically for these packages.
That should be just fine in my specific case. |
Some considerations before publishing them:
|
I think the main concern I heard last this came up is the API has a very limited target: you must buy-in to everything. This is one (of several) reasons I'm pushing on the testing-devex work is so we can have testing vocabulary terms so its easier to drop this cargo test logic into other tests without being limited in testing like is.
Until we have packages-as-namespaces, the main concern is conflicting with or blocking plugin names. |
Problem is, What should therefore be chosen here? Options I see:
|
Made a tentative implementation assuming the first option. The names should be easy to change, however, in case another option would be preferable in the end. |
I have no objection to publishing those two crates, but would like to see some warning in their doc like
Let's see how others on the team think about it. @rfcbot fcp merge This proposes we publish |
Team member @weihanglo has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
Thanks for the review!
In their respective |
Better in both lib.rs and README.md to me. Let's hold off until FCP ends. |
One concern I have is the To sidestep that, would it be possible to always do a semver-breaking version bump the same way the |
Maybe documenting this part of the release process further with instructions specific to requiring bumping a version could be enough instead? A concern I have is that, contrary to cargo-the-library, the contents of the smaller crates don't often change, meaning empty releases would be created, like you mentioned. Would it happen often, though? |
Every release because the MSRV gets bumped every release. When MSRV RFC is approved and Speaking of, if we publish this, the |
@ehuss |
Just to be clear -- sorry if I wasn't, I meant to ask about the frequency of such empty releases, i.e. ones that don't include any kind of change in it; a non-empty release would be one with at least one commit during the six-week period. Thanks for the additional info. Manually looking at the logs from GitHub Web -- I don't have a better option at the moment, a very rough estimate is that in the past year, the |
I think it depends if we end up having stable crates that we maintain for public consumption (like the build.rs helper). In that case, I think it is useful to have these checks in PR because we do want to be careful about accidental semver-breaking changes, and those can sometimes be hard to see during review. But I think I would be fine with separating the job. Worst case we can revert semver-breaking changes if we decide those were unintentional. I think another concern is that it just shifts the burden onto someone else (you?) to deal with the fussy task of bumping versions. If you're ok with that, then it seems fine with me. |
Can we have the Action bump the versions in the PR? We can then review the bumps and suggest a change and commit it ourself before merging. I mention this because its the workflow I want for changelogs. |
Could you elaborate on this? |
This is getting back to epage/epage.github.io#23 |
I also found this quite useful for checking what has changed when doing #13494, so I slightly lean toward the current workflow. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
As discussed in rust-lang#10147. Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
The cargo test helper crate would be a very much appreciated relief for all
cargo-$tool
plugins, mostly speaking forcargo-unleash
andcargo-spellcheck
.(This didn't seem to match any category, hence the free form issue).
The text was updated successfully, but these errors were encountered: