LocalRegistry.jl icon indicating copy to clipboard operation
LocalRegistry.jl copied to clipboard

Towards 1.0 - breaking changes

Open GunnarFarneback opened this issue 3 years ago • 3 comments

Going forward I'd like to make some changes, some of which need to be breaking. This issue is intended to announce what's coming up and giving a chance to discuss it.

To begin with this is what I want to achieve:

  • Registries can be downloaded from package servers instead of being cloned from git. LocalRegistry should be able to make an own clone of the registry if the one in DEPOT/registries is not a git clone. Implemented in #47.
  • Better support for using LocalRegistry from CI pipelines. This requires some configurability to allow reregistering the same version to do nothing instead of giving an error, cloning separate copies of the registry (like above), and registering on custom branches. Implemented in #47.
  • Make it practical to register packages in General. This is not the main focus of LocalRegistry but I'd like to have it as an option since the workflow is fairly different from Registrator and JuliaHub.
  • Simplify the interactive registration further to allow, in typical cases,
julia --project=<path_to_package>
using LocalRegistry
register()

both for registration of new versions and new packages. The latter requires that exactly one registry is installed besides General. First part implemented by #32, second part by #35. Extended further in #47 to also register a package in the current directory if the active project is not a package.

The necessary breaking changes identified so far are:

  • git push the registry changes by default, #7. This is probably the more useful default anyway and if making the registration changes in a separate clone of the registry, possibly in a temporary location, manual pushing will be quite inconvenient. Implemented in #36.
  • Change the registry argument to register from positional to keyword. With the option to register based on the current project it would no longer be obvious if a single argument specifies a package or a registry. Implemented in #35.
  • Probably make some behavior dependent on isinteractive.

Further incoming breaking changes will be added to this list.

GunnarFarneback avatar Apr 03 '21 16:04 GunnarFarneback

This requires some configurability to allow reregistering the same version to do nothing instead of giving an error

I'm inclined to just make reregistration not give an error at all, only explain that it's not going to perform a registration.

GunnarFarneback avatar Oct 22 '21 21:10 GunnarFarneback

On the subject of reregistration. When testing initial package development locally, I frequently want to reregister v0.1.0 until I'm ready to go public. It would help me if there were a way to force registration.

CiaranOMara avatar Nov 19 '21 03:11 CiaranOMara

I'm not going to make it convenient to change anything that has already been entered into the registry; that goes counter to the whole idea of the Julia registries. Of course you can do anything you want with your own registry so make a script which combines a git reset with a call to register if you must. Otherwise the usual workflow is to Pkg.develop the package while developing it, or Pkg.add the development branch if that fits better. Or just step through 0.0.x versions until you're ready for 0.1.0.

GunnarFarneback avatar Nov 20 '21 14:11 GunnarFarneback