Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add hex.registry add Command #931

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

Open
aj-foster wants to merge 4 commits into hexpm:main
base: main
Choose a base branch
Loading
from aj-foster:aj/feat/registry-add

Conversation

@aj-foster
Copy link

@aj-foster aj-foster commented Dec 14, 2021

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_registry or even an in_local_registry macro?

With your guidance, I'm happy to contribute towards the right solution for the long term.

names =
for {name, %{updated_at: updated_at}} <- versions do
%{name: name, updated_at: updated_at}
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enum.map is preferred here since it will error if the match fails.

Copy link
Author

@aj-foster aj-foster Nov 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change build to match? If desired, I can include changes to build in this PR or save them for a follow-up PR.

Copy link
Member

ericmj commented Nov 2, 2022

Hi @aj-foster! What's the status of this PR?

Copy link
Author

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.

Copy link
Member

ericmj commented Nov 7, 2022

@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! 💜

Copy link
Author

aj-foster commented Nov 12, 2022
edited
Loading

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.

@ericmj ericmj force-pushed the main branch 2 times, most recently from 24c6c48 to 0edaffc Compare February 2, 2023 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@wojtekmach wojtekmach wojtekmach left review comments

@ericmj ericmj ericmj left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /