From: Joe Armstrong <erl...@gmail.com>
Date: Tue, 23 Oct 2012 09:46:18 +0200
Local: Tues, Oct 23 2012 3:46 am
Subject: Re: [erlang-questions] Turning rebar into a package manager
On Fri, Oct 19, 2012 at 2:33 PM, Fred Hebert <monon...@ferd.ca> wrote:
That's very interesting. Thanks for the reference
> For anyone interested, there's been an interesting blog post on the topic of > package managers written at > http://hyperthunk.wordpress.com/2012/05/28/does-erlangotp-need-a-new-... I got to thinking a bit more. ...
The above link has an example command
just what I wanted At some level of abstraction we need to tag versions of applications.
If we adopt a common tagging convention then we can do two things.
1) express dependencies (ie foo-1.4.5 depends upon bar-3.2.6)
At the moment I guess very few Erlang git projects made by rebar have
Two more problems remain:
A) Weakening the dependencies
I know what foo-3.4.2 depends upon bar-4.2.5 means - this is
Should we allow foo-3.* depends upon bar-4.*
There must be some language of dependencies, and conventions
Does anybody have any pointers to a discussion of this.
I'd like a few simple rules that cover the common use cases
B) The *one* module name problem
We can't load modules in foo-1.2.3 and foo-2.1.6 into the
There are a number of solutions possible:
i) name_munging -> convert xx.erl to xx_foo_1.2.3.erl
It *is* possible - but you have to take care of registered
ii) Don't solve the problem at all. Run A and B in different nodes
My feeling is ii) is correct - we could then define a node as
I think problems of /consistency of
How could one make a release?
a) All contributors must tag versions of their applications and
Maybe volunteers could make releases - actually a release is little
Seems we also need to standardize a new an improved manifest file - we
What should be in the manifest?
How should things be packaged?
I rather like the "put everything in a zip file (with a changed
Again design of the manifest should strike a balance between simple
Cheers
/Joe
> They mention a few very interesting issues that are likely to be brought up
> On 12-10-19 6:36 AM, Joe Armstrong wrote:
>> Here is a programming exercise ...
>> I think we can turn rebar into a package manager with 4 simple and one not
>> This would turn rebar from being something that is very useful to
>> (aside - I'm revising my Erlang book, and I'd like to describe
>> The one I've seen that I like a lot is npm (node package manager)
>> So this is how I think rebar could become a package manager
>> Tweak 1
>> > rebar get-deps
>> Fetches the dependencies in rebar.conf and stores them in
>> After a while you get dependencies scattered all over the place,
>> This means that there is no central place to go and look if you
>> NPM sticks ALL dependencies under ${HOME}/.npm
>> Suggestion:
>> All dependencies should be stored in ${HOME}/.erl_packages
>> (Aside - if we followed npm the directory structure would be
>> ${HOME}/.erl_packages/cowboy/6.2.1/src
>> etc. ie a package/Vsn/src ... structure
>> Tweak 2
>> move rebar.config to ${HOME}/.erl_packages/rebar.config
>> > rebar add_package foo
>> might add a line like
>> to rebar.config
>> The point here is to change the content of rebar.config with
>> Tweak 3
>> Tweak 4
>> Fix the erlang load paths to find all the dependencies
>> I do this now. Put all my dependencies in
>> Home = os:getenv("HOME").
>> Tweak 5
>> Somebody has to write a program to do this.
>> The package index should be at a well know URL
>> > rebar get_index
>> This should fetch the index from the well-know URL and store in
>> > rebar search XXX
>> would search the fetched index
>> > rebar add XXXX
>> would take the index entry add it to the config fill fetch the code
>> Note the following:
>> 1) The trust model.
>> We trust the supplier of a program not the program.
>> So for example on github we might trust programs
>> It would be quite easy to add a trust section to rebar.config
>> {trust, ["git://joearms", git://erlang", ...]}
>> 2) There is no "publish" step
>> We put our code on github (or somewhere) and hope that it gets indexed
>> We might mail the indexer if it is published in an obscure place.
>> Comments?
>> Cheers
>> /Joe
erlang-questions mailing list erlang-questi...@erlang.org http://erlang.org/mailman/listinfo/erlang-questions You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||