Escript installation via SCM

90 views
Skip to first unread message

Eric Meadows-Jönsson

unread,
May 24, 2016, 2:13:57 PM5/24/16
to elixir-l...@googlegroups.com
Today we have `mix escript.install` for installing escripts on the local system.
It supports installing pre-built escripts from the local filesystem or via HTTP.

One issue with this is that the project maintainers need to build and host the
escripts themselves which goes against the conveniences we have built around Mix
with Hex and the surrounding tooling such as HexDocs.

We propose to extend the `escript.install` task with support for building and
installing projects via Git URLs or Hex package names. Examples of this would be:

    $ mix escript.install github my_project git_ref
    $ mix escript.install git https://path/to/git/repo git_ref
    $ mix escript.install hex phoenix_new
    $ mix escript.install hex phoenix_new 1.2.3

This would fetch the project and its dependencies to a temporary directory with
Mix' dependency tooling, build the project as an escript and install it on the
local system.

--
Eric Meadows-Jönsson

Paul Schoenfelder

unread,
May 24, 2016, 2:51:47 PM5/24/16
to elixir-l...@googlegroups.com
I'm a fan - this sounds like a great improvement!

Paul

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAM_eaphaedqPnGyZSBM4hny%3D_Xv3rMz4R8kHW8ow-uYPPueiMQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Eric Meadows-Jönsson

unread,
May 24, 2016, 3:03:20 PM5/24/16
to elixir-l...@googlegroups.com
I just realized I forgot to include the purpose of the email: "asking for feedback about this feature" :). Please let us know if you have any concerns or want to make any changes to it.

If there are no major changes based on feedback on this feature I will open an issue for it in a few days and leave it up for grabs.
--
Eric Meadows-Jönsson

Gleb Arshinov

unread,
May 26, 2016, 3:47:32 PM5/26/16
to elixir-l...@googlegroups.com
Eric,

I have been watching 'mix escript.install' with concern. One of the
best thing about mix is that it does not install anything outside the
project directory and ~/.mix. Unlike ruby gems, which are a
disaster.

My concern is about "install it on the local system"? What is
"system"? Usually this word would mean something you do as superuser,
preferably using distribution's package manager.

And what is the the use case for this feature? Will it replace
archives for doing "mix phoenix.new"?

Looking at the PR for this
https://github.com/elixir-lang/elixir/pull/2974 it seems these will go
into ~/.mix/escripts This is reassuring. So it won't install
anything system-wide?

How are you going to handle name clashes
between different package versions, and different Elixir versions? Is
this a reasonable question, given whatever usecase you have in mind?

Best regards,

Gleb

On Tue, May 24, 2016 at 3:03 PM, Eric Meadows-Jönsson
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elixir-lang-co...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elixir-lang-core/CAM_eapjmC6Uj3uAPok%2B-AFW3jPctwrw65gnG%2BMqcYZxbS5ut2Q%40mail.gmail.com.

José Valim

unread,
May 26, 2016, 3:51:16 PM5/26/16
to elixir-l...@googlegroups.com
The plan is to always install in ~/.mix/escripts which you should add to your path. Messing with the user system is a no-go.

Version wise, we currently support only the latest version of the archive. It should be straightforward to add multiple versions to escripts though (not possible for archives).

Differently from archives, escripts are isolated and self-contained. They depend only on your Erlang VM installation.

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


--


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

Gleb Arshinov

unread,
May 26, 2016, 4:22:09 PM5/26/16
to elixir-l...@googlegroups.com
Thanks Jose. Sounds good. I'd change docs/marketing "install it
on the local system" to "install it in ~/.mix/escripts"/ to avoid the
confusion.

Best regards,

Gleb
> https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4LoMuD6Kffh-BLhRO9DyKTMB6y1WPkXuxdgEWp4GykuLQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages