erlware / relx

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

windows dev_mode creates wrong kind of links #572

Open vladdu opened 7 years ago

vladdu commented 7 years ago

The links created on windows for dev_mode seem to be hard instead of soft, because removing them removes the original files too.

rebar3 new release
cd myapp
rebar3 release
# edit rebar.config, change dev_mode to false
rebar3 release
*CRASH*, source files are now empty

Strangely, using rebar3 as prod release instead of the last two steps works, even though it should do the same thing.

(originally reported as https://github.com/erlang/rebar3/issues/1488)

vladdu commented 7 years ago

Actually rebar3 as prod release may just reuse the existing links and not recreate them, because a subsequent rebar3 release results in the problem anyway. Possibly it is the links from _build/default/lib/myapp/src? (in which case it may be a rebar problem after all?)

marianoguerra commented 7 years ago

More things that work incorrectly because wrong links are created:

rebar3 release in dev mode creates links in _build\default\rel\\releases\ for sys.config and vm.args that are invalid (at least for me), later when extracting node_name from vm.args fails and _build\default\rel\\bin\ install fails with a weird error:

erts-8.2\bin\erlsrv.exe: Unrecognized option .

because the argument where node_name should go is empty