Local hex repository for offline development?

571 views
Skip to first unread message

Mark

unread,
Jun 13, 2016, 8:32:22 PM6/13/16
to elixir-lang-talk
How do most elixir developers work when they are offline or working with very low bandwidth availability?  is there an option to clone the hex repository locally and then work from that?  I am going to be in a very low bandwidth area (as in travel miles just to get a cell connection) and would still like to develop using the standard set of packages available in mix?  How is that scenario handled?

Thanks 

-mark

José Valim

unread,
Jun 14, 2016, 2:40:11 AM6/14/16
to elixir-l...@googlegroups.com
Hex is going to used packages cached locally if you have no connection. You can try it out by running mix deps.get after turning off your internet. I believe there is also a HEX_OFFLINE environment variable you can set to 1 before running but I am not 100% sure.
--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/af87c04a-8d96-4b98-a8d1-17c0f8519db3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--


José Valim
Skype: jv.ptec
Founder and Director of R&D

Eric Meadows-Jönsson

unread,
Jun 14, 2016, 11:55:23 AM6/14/16
to elixir-l...@googlegroups.com
As José said, Hex will have every package you have fetched at some point cached locally so you can always fetch them again. There's currently nothing built-in to fetch *every* package on hex.pm. That would be over 10000 files and more than 600mb of data and it grows every day so I am not sure if that is something we should provide to all users built-in to hex.

If more people will be asking for this maybe we can provide a bundle we build periodically so you can download all packages as a single request.


For more options, visit https://groups.google.com/d/optout.



--
Eric Meadows-Jönsson

Uniaika

unread,
Jun 14, 2016, 11:57:53 AM6/14/16
to elixir-l...@googlegroups.com
Indeed something like apt-cache would be awesome, considering that it's
currently impossible you run our own Hex repo with the official one

Eric Meadows-Jönsson

unread,
Jun 14, 2016, 2:32:46 PM6/14/16
to elixir-l...@googlegroups.com
Given I don't know much about linux package managers or apt-get; from a quick googling it seems like practically all functionality in apt-cache is available through different mix and hex commands. Can you point to some specific feature(s) you feel are missing?

--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Eric Meadows-Jönsson

Alexei Sholik

unread,
Jun 14, 2016, 3:13:13 PM6/14/16
to elixir-l...@googlegroups.com
Or experiment with IPFS. There's a project that aims to mirror npmjs.com in IPFS with a very cool name http://everythingstays.com/.

Rich Morin

unread,
Jun 14, 2016, 4:59:18 PM6/14/16
to elixir-l...@googlegroups.com
On Jun 14, 2016, at 11:32, Eric Meadows-Jönsson wrote:
> Given I don't know much about linux package managers or apt-get;
> from a quick googling it seems like practically all functionality
> in apt-cache is available through different mix and hex commands.
> Can you point to some specific feature(s) you feel are missing?

The original posting asked for a way to "develop using the standard
set of packages available in mix" while "offline or working with very
low bandwidth availability".

Could you suggest a way to do this using mix and hex commands? This
might allow the OP to evaluate what's available and perhaps set up a
workable solution before hitting the road...

-r

--
http://www.cfcl.com/rdm Rich Morin r...@cfcl.com
http://www.cfcl.com/rdm/resume San Bruno, CA, USA +1 650-873-7841

Software system design, development, and documentation


Mark

unread,
Jun 14, 2016, 7:15:35 PM6/14/16
to elixir-lang-talk

On Tuesday, June 14, 2016 at 4:59:18 PM UTC-4, Rich Morin wrote:
On Jun 14, 2016, at 11:32, Eric Meadows-Jönsson wrote:
> Given I don't know much about linux package managers or apt-get;
> from a quick googling it seems like practically all functionality
> in apt-cache is available through different mix and hex commands.
> Can you point to some specific feature(s) you feel are missing?

The original posting asked for a way to "develop using the standard
set of packages available in mix" while "offline or working with very
low bandwidth availability".

Could you suggest a way to do this using mix and hex commands?  This
might allow the OP to evaluate what's available and perhaps set up a
workable solution before hitting the road...
 
Thanks for all the comments - several of these sound like they may be in the future for hex but as Mr Morin indicates I have a shorter term need.  

-mark

Eric Meadows-Jönsson

unread,
Jun 15, 2016, 4:24:44 AM6/15/16
to elixir-l...@googlegroups.com
On Tue, Jun 14, 2016 at 10:58 PM, Rich Morin <r...@cfcl.com> wrote:
The original posting asked for a way to "develop using the standard
set of packages available in mix" while "offline or working with very
low bandwidth availability".

Could you suggest a way to do this using mix and hex commands?  This
might allow the OP to evaluate what's available and perhaps set up a
workable solution before hitting the road...

-r

 --
http://www.cfcl.com/rdm           Rich Morin           r...@cfcl.com
http://www.cfcl.com/rdm/resume    San Bruno, CA, USA   +1 650-873-7841

Software system design, development, and documentation


As we've said, all packages you have fetched at some point will be cached on your computer so if don't have a network connection you can still use them in existing or new projects you are working on. But there are currently no features in Hex to download the entire set of 10000 packages, if you need that you need to build it yourself or send a PR to https://github.com/hexpm/hex.

Here is the specification for the endpoints you need to fetch from in the repository https://github.com/hexpm/specifications/blob/master/endpoints.md. Here is the documentation for the registry so you know which was files to fetch https://github.com/hexpm/specifications/blob/master/registry.md.

--
Eric Meadows-Jönsson
Reply all
Reply to author
Forward
0 new messages