Registrator.jl
Registrator.jl copied to clipboard
refuse to register already-tagged versions
There are a lot of package authors still tagging first and registering later, which often leads to mismatches between what’s tagged and what’s registered. TagBot posts a comment after the fact warning that this has happened, but we should check if a tag or release already exists and refuse to kick off registration in the first place if it doesn’t point to the commit that is being registered.
In the README we mention that the registration process does not depend on the tag. I would say that the package owners are responsible for the tag being correct.
The registration process doesn't depend on the tag, but we do need tags in order to be sure that the registered tree stays around even if the commit is no longer on any public branch, so we do kind of depend on tags. It's also just bad if there are tags/releases and they don't match what's registered. It's fine if there's no tag (as long as there's a public branch that doesn't go away), but if there is a tag and it's wrong, that's actively confusing.
Okay.
The issue is fixed but not deployed yet.
Should we allow existing tags if the tag commit matches the registration commit?
Yes, I think it's fine in that case.
Should we allow existing tags if the tag commit matches the registration commit?
What happens if the initial registration matches the existing tag, but then a General registry maintainer requests a change (e.g. "please add a compat entry for Julia and then re-trigger Registrator")? After the package maintainer makes the requested change and re-triggers Registrator, the updated registration will no longer match the existing tag.
We are checking the commit id of the tag in #203 . When they don't match the registration will not go through.
What happens if the initial registration matches the existing tag, but then a General registry maintainer requests a change (e.g. "please add a compat entry for Julia and then re-trigger Registrator")? After the package maintainer makes the requested change and re-triggers Registrator, the updated registration will no longer match the existing tag.
Then they have to delete the existing tag.
Then they have to delete the existing tag.
In general (non-julia) one creates a patch-release to fix the previous broken release. From the point of Registrator.jl this will look like a skipped version number since it didn't accept the broken one. Would it be feasible to allow the version skip in that case?
If I'm understanding correctly, I have to tag after pinging the registrator? That's fine I guess, I'll need to change the workflow a bit, but the error message wasn't easy to understand at first: https://github.com/adigitoleo/PlateMotionRequests.jl/commit/7b67df820ea9ac8044ad0ab3bc0de8fe09aefce1
Because the tag does in fact point to that commit. ~~I guess it means that registering creates its own commit?~~ It creates the PR.