-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Fail if crates.io has the same version as in Cargo.toml #803
Comments
Many projects use the "bump the version right before publishing" workflow, including most of my own. So definitely not a good default. But I could be convinced to have an option for this. I'm curious though: how would you use such a flag? Could you point me to a project where you'd use it in such a way? Asking so I can figure out why you're suggesting this is better as a For example, |
Thanks for such a quick reply! I use it in sqlite-hashes and sqlite-compressions (they are nearly identical). I would like to avoid the following scenario:
Instead, I would prefer for my repos to always be in the "ready-to-be-published" state - i.e. just clicking "publish new release" button should be certain to pass including cargo publishing I did implement a test similar to your suggestion, but it seems ugly, only tests the latest version (what if somehow I have older version in the repo?), and you already do most of the steps to make this test much easier. |
@obi1kenobi do you think that maybe this should be moved to the |
I've been thinking about this for a few days now, and I came to the following conclusions:
Given all this, I don't think I can justify the effort of building this feature in the place of any other feature I could dedicate an equivalent amount of time to. If you're interested in pushing this forward and can commit the ~2-3 weeks of work I estimate it would take to implement and nail down + test all the edge cases, I'd be happy to support you in that and point you in the right direction. Of course, even this is not a guarantee the work would be merged in the end — the code would have to be of satisfactory quality at my sole discretion, since I'd have to maintain it ~indefinitely going forward. Alternatively, if this feature is something your employer wants and can justify dedicating some budget to, I'd be happy to work out a commercial build & support contract for it with you. Otherwise, I'd be happy to move this issue to the I'm sorry — I know this isn't the answer you were hoping for. Unfortunately, open-source is a resource-scarce environment and I'm often forced to make unfortunate decisions like this for the sake of the longevity of the project. |
@obi1kenobi thanks for an in-depth look at this request! Please move it to the upstream repo, and lets reevaluate in 6m. Thx for the awesome work! |
This amazing tool's documentation starts with
but I think this tool is missing one important test - it does not fail in case the current code version has already been published. So unless CI does some magical version bump automatically and commits it to the repo before doing
cargo publish
, I think this tool should preventcargo publish
from even running? This might be an optional flag though - so that if some repo prefers to keep the version inCargo.toml
the same as latest published, they can?The text was updated successfully, but these errors were encountered: