Add `hex.registry add` Command
This PR supersedes #920. See that PR for previous discussion.
In this PR, we add a mix hex.registry add command to the existing mix task. The purpose of this command is to allow private registry maintainers to add one or more packages to an existing registry without necessarily having all of the package tarballs present.
At the time or writing, this PR is a minimal effort for the purpose of discussion. We have an opportunity to make larger changes to the hex.registry task to support future growth, if desired.
Some topics to consider:
- Do you have any recommendations for error messages when, for example, someone attempts to add a non-existent tarball?
- Should we support adding a package that matches one already in the registry?
- Should we create separate (and more granular) functions for reading and writing local registries, for the purpose of reuse as we add additional commands in the future (e.g.
remove,retire)? - Should we provide test setup helpers, such as
create_local_registryor even anin_local_registrymacro?
With your guidance, I'm happy to contribute towards the right solution for the long term.
Hi @aj-foster! What's the status of this PR?
Hi @ericmj I still need to respond to your comments and make changes based on the merged changes to hex_core. Apologies for not cleaning this up sooner.
@aj-foster No worries, just checking in to get the status. I will leave the PR open and you can get to it if you get the time. Thank you! 💜
Hi @ericmj — Made some updates to this PR. Hopefully I re-understood everything correctly, since it's been a while. 🙂 Just a few comments in the above threads to make sure I'm on the right track.