erlware / relx

Sane, simple release creation for Erlang
http://erlware.github.io/relx
Apache License 2.0
697 stars 232 forks source link

Ensure stdlib,kernel as application dependencies #567

Closed lrascao closed 7 years ago

lrascao commented 7 years ago

Make this dependency explicit as it was causing apps with empty application lists to not be included in the generated release.

Fixes #434, #566

tsloughter commented 7 years ago

I don't think we can do this. There are cases people do not want kernel and stdlib.

bitwalker commented 7 years ago

I was under the impression both are required for releases?

tsloughter commented 7 years ago

It would be a nice default to automatically include them, but I don't know that it is worth breaking existing usage to do so.

Though I am not 100% positive this is the case and that it is still used by those who needed this.

@fhunleth you were one of the people who didn't want kernel/stdlib always for embedded systems, right? Is that true and are you still using relx? I saw you were using Elixir now so maybe using distillery anyway?

bitwalker commented 7 years ago

I believe Nerves is currently using Distillery, but I'll defer to @fhunleth on that. If so, this default is already being used.

tsloughter commented 7 years ago

Hmm, interesting. The other embedded person I can remember is is @peerst so maybe it was him that needed this?

fhunleth commented 7 years ago

@tsloughter We did recently switch to Distillery. There are projects that are locked to older versions of Nerves that probably won't upgrade to the Nerves version that uses Distillery. In the unlikely event that they upgrade relx, I think this change is still fine for them. I only know of one Nerves project that doesn't use stdlib and kernel, and it was a proof of concept.

peerst commented 7 years ago

@tsloughter: it was definitely not me. We target smaller systems than Nerves but still want stdlib and kernel. If we want to run on very small SoC (relatively speaking) we might want to throw out some modules from stdlib and kernel but we would still include them, just our own version of them.

For that we would then probably use reltool under rebar3 (have a hacked version of a plugin for that) since this would give us the possibility of dropping single modules from a release. Unless relx would get this feature too though ...

lrascao commented 7 years ago

@peerst it does! https://github.com/erlware/relx/pull/541

tsloughter commented 7 years ago

Thanks @peerst it sounds like it was Frank but is also unneeded.

Note that relx does have exclude_modules option.

tsloughter commented 7 years ago

So sounds like this is ok, I'll merge this then.

tsloughter commented 7 years ago

Though curious, @lrascao, should we also make sure that not only if it is [] but if it is any list of apps that kernel and stdlib are there?

peerst commented 7 years ago

For me its definitely ok (I was the OP for #434) and its also better compatibility with reltool which does this implicit kernel/stdlib thing

peerst commented 7 years ago

@lrascao: cool that relx can exclude_modules! Very helpful to squeeze into small systems

lrascao commented 7 years ago

@tsloughter that does sound better, i'll make the change