-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
improvement: install private packages from hexpm #157
base: main
Are you sure you want to change the base?
Conversation
@hypno2000 If you wouldn't mind installing Igniter with |
Thanks for that quick response! We need specifically organization (not repo), ie |
Ah, I misunderstood the spec :) I haven't used anything but the default hex orgs/repos before, so forgive my ignorance here. To make sure I understand: So you all have private packages hosted on hex.pm under your organization, and need to install those, whereas others may have private packages hosted on a separate repo with the default or no organization, e.g. Oban Pro. Assuming that understanding is correct, we may want to support both of these. Since Hex.pm presents private packages as Sound reasonable? |
4bc9083
to
406f3d6
Compare
repo/package
@hypno2000 Made the changes described above, let me know if they work for you 🙂 |
By the way, I'm going to convert this PR to a draft for now because @zachdaniel is on vacation, but I'd like him to sign off on the |
The syntax makes sense to me.
yes exactly right now i am getting same result as before:
i suspect that is because of my local hex auth is not passed on here: |
Out of curiosity, does it work if you specify a version? |
And you're definitely right re: the HTTP request. Perhaps we should be using hex_core here. |
i am getting this with specific version:
|
Oh, dang it I just found this after completing my PR. #158 I'll go ahead and close mine. |
(Oops, didn't mean to close this earlier.) @hypno2000 I've pushed a commit that I believe should allow you to install packages from organizations now. For now I've removed support for repos other than hex.pm. Hex is two parts: an API and a Repo. The API has richer metadata about versions, like which versions might be retired; the Repo is just a "dumb" store of tarballs and checksums. It's much easier to host a Repo, which can be as simple as a static file server, than it is the API. I think repo support could be added back in, we just need to make the request a bit differently, but I want to make sure organization support works correctly first. |
it works now when version is specified, but without it still fails due to the auth issue:
|
Is |
Sorry, stalled on this a little bit. @zachdaniel Sort of, but relying on it might be pretty icky. We do have |
Interesting. Could we perhaps talk to the folks at hex and find out if any of this could reasonably be leveraged to these ends? Would it be bad primarily because these aren't public interfaces? Or are there other reasons it would be an issue? |
I did chat with Wojtek when originally working on this, and my impression is that this stuff is rather stable and unlikely to change. He was the one, for instance, who suggested this. If |
Well all that sounds pretty positive to me in that case 😄 I'm happy to rely on it. The bits of code that use this shouldn't be run outside of a mix task, the only thing I could imagine us having to do is to prompt users to install hex and restart in rare scenarios where it hadn't been installed yet. |
6d6aa26
to
618cb9c
Compare
Closes #155.
Contributor checklist