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

custom erl_opts not working #741

Open
ziyouchutuwenwu opened this issue Nov 20, 2021 · 0 comments
Open

custom erl_opts not working #741

ziyouchutuwenwu opened this issue Nov 20, 2021 · 0 comments

Comments

@ziyouchutuwenwu
Copy link

Steps to reproduce

mix.exs

defp deps do
  [{:distillery, "~> 2.1"}]
end

run init

MIX_ENV=prod mix distillery.init

change rel/config.exs

environment :prod do
  set erl_opts: "encrypt_debug_info"
  set output_dir: "aaa"
  set include_erts: true
  set include_src: false
  set cookie: :"[&J)D@ss/1:xNY3zm[&![fWf!{xt6y}F>QQdIqRjvV*RoNHLT10ILC}~Wwf6.vo6"
  set vm_args: "rel/vm.args"
end

run this command

MIX_ENV=prod mix distillery.release --verbose

Verbose Logs

Paste the output of the release command you ran with the --verbose flag
below in the summary tags (this helps keep the issue easy to navigate):

Generated distillery app
==> demo
Compiling 1 file (.ex)
Generated demo app
==> Loading configuration..
==> Assembling release..
==> Building release demo:0.1.0 using environment prod
==> Discovered applications:
  > elixir-1.12.3
  |
  |  from: /home/mmc/.asdf/installs/elixir/1.12.3-otp-24/bin/../lib/elixir
  |  applications:
  |      :kernel
  |      :stdlib
  |      :compiler
  |  includes: none
  |_____

  > mix-1.12.3
  |
  |  from: /home/mmc/.asdf/installs/elixir/1.12.3-otp-24/bin/../lib/mix
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |  includes: none
  |_____

  > iex-1.12.3
  |
  |  from: /home/mmc/.asdf/installs/elixir/1.12.3-otp-24/bin/../lib/iex
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |  includes: none
  |_____

  > sasl-4.1
  |
  |  from: /home/mmc/.asdf/installs/erlang/24.0/lib/sasl-4.1
  |  applications:
  |      :kernel
  |      :stdlib
  |  includes: none
  |_____

  > compiler-8.0
  |
  |  from: /home/mmc/.asdf/installs/erlang/24.0/lib/compiler-8.0
  |  applications:
  |      :kernel
  |      :stdlib
  |  includes: none
  |_____

  > stdlib-3.15
  |
  |  from: /home/mmc/.asdf/installs/erlang/24.0/lib/stdlib-3.15
  |  applications:
  |      :kernel
  |  includes: none
  |_____

  > runtime_tools-1.16.2
  |
  |  from: /home/mmc/.asdf/installs/erlang/24.0/lib/runtime_tools-1.16.2
  |  applications:
  |      :kernel
  |      :stdlib
  |  includes: none
  |_____

  > distillery-2.1.1
  |
  |  from: _build/prod/lib/distillery
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |      :runtime_tools
  |      :artificery
  |  includes: none
  |_____

  > artificery-0.4.3
  |
  |  from: _build/prod/lib/artificery
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |  includes: none
  |_____

  > kernel-8.0
  |
  |  from: /home/mmc/.asdf/installs/erlang/24.0/lib/kernel-8.0
  |  applications: none
  |  includes: none
  |_____

  > demo-0.1.0
  |
  |  from: _build/prod/lib/demo
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |      :logger
  |      :distillery
  |  includes: none
  |_____

  > logger-1.12.3
  |
  |  from: /home/mmc/.asdf/installs/elixir/1.12.3-otp-24/bin/../lib/logger
  |  applications:
  |      :kernel
  |      :stdlib
  |      :elixir
  |  includes: none
  |_____

==> Running validation checks..
    > Distillery.Releases.Checks.Erts * PASS
    > Distillery.Releases.Checks.Cookie * PASS
    > Distillery.Releases.Checks.LoadedOrphanedApps * PASS
==> Generated overlay vars:
    release_name=:demo
    release_version="0.1.0"
    is_upgrade=false
    upgrade_from=:latest
    dev_mode=false
    include_erts=true
    include_src=false
    include_system_libs=true
    erl_opts=""
    run_erl_env=""
    erts_vsn="12.0"
    output_dir="aaa"
==> Copying applications to aaa
==> Generating start_erl.data
==> Generating vm.args from rel/vm.args
==> Generating sys.config from config/config.exs
==> Including ERTS 12.0 from /home/mmc/.asdf/installs/erlang/24.0/erts-12.0
==> Generating boot scripts
==> Generating RELEASES
==> Applying overlays
==> Applying mkdir overlay
    dst: releases/0.1.0/hooks
==> Applying mkdir overlay
    dst: releases/0.1.0/hooks/pre_configure.d
==> Applying mkdir overlay
    dst: releases/0.1.0/hooks/post_configure.d
==> Applying mkdir overlay
    dst: releases/0.1.0/hooks/pre_start.d
==> Applying mkdir overlay
    dst: releases/0.1.0/hooks/post_start.d
==> Applying mkdir overlay
    dst: releases/0.1.0/hooks/pre_stop.d
==> Applying mkdir overlay
    dst: releases/0.1.0/hooks/post_stop.d
==> Applying mkdir overlay
    dst: releases/0.1.0/hooks/pre_upgrade.d
==> Applying mkdir overlay
    dst: releases/0.1.0/hooks/post_upgrade.d
==> Applying copy overlay
    src: _build/prod/lib/distillery/priv/libexec
    dst: releases/0.1.0/libexec
==> Applying mkdir overlay
    dst: releases/0.1.0/commands
==> Packaging release..
==> Archiving demo-0.1.0
==> Writing archive to /home/mmc/projects/elixir/demo/aaa/releases/0.1.0/demo.tar.gz

Description of issue

please check these lines

==> Running validation checks..
    > Distillery.Releases.Checks.Erts * PASS
    > Distillery.Releases.Checks.Cookie * PASS
    > Distillery.Releases.Checks.LoadedOrphanedApps * PASS
==> Generated overlay vars:
    release_name=:demo
    release_version="0.1.0"
    is_upgrade=false
    upgrade_from=:latest
    dev_mode=false
    include_erts=true
    include_src=false
    include_system_libs=true
    erl_opts=""
    run_erl_env=""
    erts_vsn="12.0"
    output_dir="aaa"
==> Copying applications to aaa
==> Generating start_erl.data
==> Generating vm.args from rel/vm.args
==> Generating sys.config from config/config.exs

var output_dir is correct, but erl_opts not working.

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant