Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev mode with RELX_REPLACE_OS_VARS overwrites var-enabled sys.config/vm.args #1753

Open
priestjim opened this Issue Apr 19, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@priestjim
Copy link

priestjim commented Apr 19, 2018

Environment

Rebar3 report
 version 3.5.0
 generated at 2018-04-19T01:32:48+00:00

-----------------
Operating System: x86_64-apple-darwin17.3.0
ERTS: Erlang/OTP 19 [erts-8.3.5.4] [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false] [dtrace]
Root Directory: /usr/local/Cellar/erlang@19/19.3.6.8/lib/erlang
Library directory: /usr/local/Cellar/erlang@19/19.3.6.8/lib/erlang/lib
-----------------
Loaded Applications:
bbmustache: 1.3.0
certifi: 2.0.0
cf: 0.2.2
common_test: 1.14
compiler: 7.0.4.1
crypto: 3.7.4
cth_readable: 1.3.2
dialyzer: 3.1.1
edoc: 0.8.1
erlware_commons: 1.0.4
eunit: 2.3.2
eunit_formatters: 0.5.0
getopt: 1.0.1
inets: 6.3.9
kernel: 5.2.0.1
providers: 1.7.0
public_key: 1.4
relx: 3.24.3
sasl: 3.0.3
snmp: 5.2.5
ssl_verify_fun: 1.1.3
stdlib: 3.3
syntax_tools: 2.1.1
tools: 2.9.1

-----------------
Escript path: /Users/pj/Code/Splunk/nevro/rebar3
Providers:
  app_discovery as clean compile compile cover ct deps dialyzer do edoc escriptize eunit get-deps help install install_deps list lock new path pkgs release relup report shell state tar tree unlock update upgrade upgrade upgrade version xref
...

Current behaviour

When running a release with dev mode enabled AND RELX_REPLACE_OS_VARS=true, rebar3 will generate sys.config and vm.args with the vars replaced, and place them in the release directory, overwriting (probably because they are symlinked) the pristine variable-enabled config that generated these files in the first place.

Expected behaviour

Dev mode and RELX_REPLACE_OS_VARS should not symlink sys.config/vm.args and overwrite the vars-enabled files.

@tsloughter

This comment has been minimized.

Copy link
Contributor

tsloughter commented Jun 20, 2018

@priestjim with OTP-21 and rebar3 3.6.0 there is now the sys_config_src configuration option. This uses sys.config.src and does variable replacement on it to create sys.config, instead of the old way of copying sys.config to sys.config.orig and replacing on it which then overrode sys.config through the symlink.

I think this should resolve your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.