chef / concrete

Concrete enhances your rebar based Erlang project by providing a common Makefile wrapper, a dialyzer make target that caches PLT analysis of your project's dependencies, and a mechanism to specify development only dependencies.
Apache License 2.0
56 stars 15 forks source link

Get concrete working with latest relx #10

Closed jwilberding closed 10 years ago

jwilberding commented 10 years ago
jwilberding commented 10 years ago

This requires https://github.com/erlware/relx/pull/183

jwilberding commented 10 years ago

Fixes https://github.com/opscode/concrete/issues/9

Ready for review.

seth commented 10 years ago

So this works for me with the exception of the foreground target for the generated bin script in the release. With v0.6.0 when I run _rel/baz/bin/baz foreground I get a started app with console output and no input. With this patch, I get the same behavior as when passing console.

To repro:

## build concrete on this branch
concrete init baz
cd baz
make
make rel
_rel/baz/bin/baz 

With that I see:

Exec: /Users/seth/oc/code/opscode/concrete/baz2/_rel/baz2/erts-5.10.4/bin/erlexec -noinput +Bd -boot /Users/seth/oc/code/opscode/concrete/baz2/_rel/baz2/releases/0.0.1/baz2 -mode embedded -config /Users/seth/oc/code/opscode/concrete/baz2/_rel/baz2/releases/0.0.1/sys.config -args_file /Users/seth/oc/code/opscode/concrete/baz2/_rel/baz2/releases/0.0.1/vm.args -- foreground
Root: /Users/seth/oc/code/opscode/concrete/baz2/_rel/baz2
Erlang R16B03-1 (erts-5.10.4) [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Eshell V5.10.4  (abort with ^G)
(baz2@127.0.0.1)1> dd
(baz2@127.0.0.1)1>
(baz2@127.0.0.1)1> .
dd
(baz2@127.0.0.1)2> hello.
hello
(baz2@127.0.0.1)3>
seth commented 10 years ago

With 0.6.0 I see this desired behavior:

~/oc/code/opsco/concr/baz3 ➜ _rel/bin/baz3 foreground                                          master
Exec: /Users/seth/oc/code/opscode/concrete/baz3/_rel/erts-5.10.4/bin/erlexec -noinput +Bd -boot /Users/seth/oc/code/opscode/concrete/baz3/_rel/releases/0.0.1/baz3 -mode embedded -config /Users/seth/oc/code/opscode/concrete/baz3/_rel/releases/0.0.1/sys.config -args_file /Users/seth/oc/code/opscode/concrete/baz3/_rel/releases/0.0.1/vm.args -- foreground
Root: /Users/seth/oc/code/opscode/concrete/baz3/_rel

hello
seth commented 10 years ago

Where I typed the hello, to be clear, but the point is I don't have an active console accepting input. :)

jwilberding commented 10 years ago

Ahh ok, interesting, I will take a look.

jwilberding commented 10 years ago

@seth can you try now?

seth commented 10 years ago

foreground seems to work now!

I did a bit of searching, where is dealizer.mitigate documented? It won't be enough to add it to the top level of concrete since users creating projects and creating a plt for the first time will also hit this.

I'm thinking to remove the eunit app from the list of apps included in a base PLT build.