GunnarFarneback/LocalRegistry.jl

Repo URLs doesn't end with ".git" like they do in the General registry

arnaudh opened this issue · 2 comments

This is a relatively minor thing, but repo URLs present in the Package.toml files created by LocalRegistry.jl seem to not have .git at the end, like it is in the General registry (and as created by Registrator.jl).

e.g.

repo = "https://gitlab.example.com/test/ExampleForRegistrator.jl"

In General registry would be

repo = "https://gitlab.example.com/test/ExampleForRegistrator.jl.git"

(cf actual example)

This is an issue when trying to use Registrator.jl to register a new version of the package (initially registered with LocalRegistry.jl), in which case we get the following error:

ERROR: Registration failed: Changing package repo URL not allowed, please submit a pull request with the URL change to the target registry and retry.

I fixed this by simply manually adding ".git" to the repo URL in the Package.toml generated. With that in place, both Registrator.jl and LocalRegistry.jl will happily register new versions for the package.

I know this is a niche case (using both LocalRegistry.jl and Registrator.jl - at least during our transition to using LocalRegistry.jl), so understand if this doesn't get looked at further.

The repo is by default set to the URL in the git remote at first registration. If you want some particular naming scheme you either need to prepare your git remote URL, e.g. by cloning with the desired URL form, or use the repo keyword argument. Cf #44. I will not add code to try to normalize or second guess URL address schemes.

Thank you @GunnarFarneback!
I couldn't quite grasp the logic, and now I know to change the clone url to fix this at the source.