Coder Social home page Coder Social logo

setup's Issues

erlang:get_stacktrace/0 removed from Erlang 24

Will there be an update for Erlang 24 that removes erlang:get_stacktrace/0?

setup.erl:944:                                   "~p~n", [Error, erlang:get_stacktrace()]),
setup.erl:1163:                           [Error, erlang:get_stacktrace()]).
setup.erl:1588:            Error = {EndLine,?MODULE,{Class,Reason,erlang:get_stacktrace()}},

Example on how to disable verify_directories?

I've tried setting this in the regular env (via sys.config), to no avail. Do you have an example on how to prevent setup from creating folders when it's not being used for managing them? (my specific use case is using exometer_core)

compilation fail with rebar3

compile hooks makes the compilation crash the first time you launch it with rebar3.

===> Compiling setup
===> run_hooks("/Users/benoitc/Projects/barrel-platform/_build/default/lib/setup", pre_hooks, compile) -> no hooks defined

===> run_hooks("/Users/benoitc/Projects/barrel-platform/_build/default/lib/setup", pre_hooks, erlc_compile) -> no hooks defined

===> erlopts [debug_info,debug_info]
===> files to compile ["/Users/benoitc/Projects/barrel-platform/_build/default/lib/setup/src/setup_lib.erl",
                              "/Users/benoitc/Projects/barrel-platform/_build/default/lib/setup/src/setup_gen.erl",
                              "/Users/benoitc/Projects/barrel-platform/_build/default/lib/setup/src/setup.erl"]
===>      Compiled setup_lib.erl
===>      Compiled setup_gen.erl
===>      Compiled setup.erl
===> run_hooks("/Users/benoitc/Projects/barrel-platform/_build/default/lib/setup", pre_hooks, app_compile) -> no hooks defined

===> sh info:
        cwd: "/Users/benoitc/Projects/barrel-platform"
        cmd: git log -n 1 --pretty=format:"%h
"

===>    opts: [{use_stdout,false},
                       return_on_error,
                       {cd,"/Users/benoitc/Projects/barrel-platform/_build/default/lib/setup"}]

===> Port Cmd: git log -n 1 --pretty=format:"%h
"
Port Opts: [{cd,"/Users/benoitc/Projects/barrel-platform/_build/default/lib/setup"},
            exit_status,
            {line,16384},
            use_stdio,stderr_to_stdout,hide,eof]

===> sh info:
        cwd: "/Users/benoitc/Projects/barrel-platform"
        cmd: git log --oneline --no-walk --tags --decorate

===>    opts: [{use_stdout,false},
                       return_on_error,
                       {cd,"/Users/benoitc/Projects/barrel-platform/_build/default/lib/setup"}]

===> Port Cmd: git log --oneline --no-walk --tags --decorate
Port Opts: [{cd,"/Users/benoitc/Projects/barrel-platform/_build/default/lib/setup"},
            exit_status,
            {line,16384},
            use_stdio,stderr_to_stdout,hide,eof]

===> sh info:
        cwd: "/Users/benoitc/Projects/barrel-platform"
        cmd: git rev-list 1.6..HEAD

===>    opts: [{use_stdout,false},
                       {cd,"/Users/benoitc/Projects/barrel-platform/_build/default/lib/setup"},
                       {debug_abort_on_error,
                           "Getting rev-list of git dep failed in /Users/benoitc/Projects/barrel-platform/_build/default/lib/setup"}]

===> Port Cmd: git rev-list 1.6..HEAD
Port Opts: [{cd,"/Users/benoitc/Projects/barrel-platform/_build/default/lib/setup"},
            exit_status,
            {line,16384},
            use_stdio,stderr_to_stdout,hide,eof]

===> sh info:
        cwd: "/Users/benoitc/Projects/barrel-platform"
        cmd: compile escriptize

===>    opts: [use_stdout,
                       {cd,"/Users/benoitc/Projects/barrel-platform/_build/default/lib/setup"},
                       {env,[{"REBAR_DEPS_DIR",
                              "/Users/benoitc/Projects/barrel-platform/_build/default/lib"},
                             {"REBAR_BUILD_DIR",
                              "/Users/benoitc/Projects/barrel-platform/_build/default"},
                             {"REBAR_ROOT_DIR",
                              "/Users/benoitc/Projects/barrel-platform/."},
                             {"REBAR_CHECKOUTS_DIR",
                              "/Users/benoitc/Projects/barrel-platform/_checkouts"},
                             {"REBAR_PLUGINS_DIR",
                              "/Users/benoitc/Projects/barrel-platform/_build/default/plugins"},
                             {"REBAR_GLOBAL_CONFIG_DIR",
                              "/Users/benoitc/.config/rebar3"},
                             {"REBAR_GLOBAL_CACHE_DIR",
                              "/Users/benoitc/.cache/rebar3"},
                             {"REBAR_TEMPLATE_DIR",
                              "/Users/benoitc/.config/rebar3/templates"},
                             {"REBAR_APP_DIRS",
                              "/Users/benoitc/Projects/barrel-platform/_build/default/apps/*:/Users/benoitc/Projects/barrel-platform/_build/default/lib/*:/Users/benoitc/Projects/barrel-platform/_build/default/."},
                             {"REBAR_SRC_DIRS",[]},
                             {"ERLANG_ERTS_VER","7.1"},
                             {"ERLANG_ROOT_DIR",
                              "/Users/benoitc/local/otp/18.1.3"},
                             {"ERLANG_LIB_DIR_erl_interface",
                              "/Users/benoitc/local/otp/18.1.3/lib/erl_interface-3.8"},
                             {"ERLANG_LIB_VER_erl_interface","3.8"},
                             {"ERL","/Users/benoitc/local/otp/18.1.3/bin/erl"},
                             {"ERLC",
                              "/Users/benoitc/local/otp/18.1.3/bin/erlc"},
                             {"ERLANG_ARCH","64"},
                             {"ERLANG_TARGET",
                              "18.1.3-x86_64-apple-darwin15.0.0-64"}]},
                       {abort_on_error,"Hook for compile failed!\n"}]

===> Port Cmd: compile escriptize
Port Opts: [{cd,"/Users/benoitc/Projects/barrel-platform/_build/default/lib/setup"},
            {env,[{"REBAR_DEPS_DIR",
                   "/Users/benoitc/Projects/barrel-platform/_build/default/lib"},
                  {"REBAR_BUILD_DIR",
                   "/Users/benoitc/Projects/barrel-platform/_build/default"},
                  {"REBAR_ROOT_DIR",
                   "/Users/benoitc/Projects/barrel-platform/."},
                  {"REBAR_CHECKOUTS_DIR",
                   "/Users/benoitc/Projects/barrel-platform/_checkouts"},
                  {"REBAR_PLUGINS_DIR",
                   "/Users/benoitc/Projects/barrel-platform/_build/default/plugins"},
                  {"REBAR_GLOBAL_CONFIG_DIR","/Users/benoitc/.config/rebar3"},
                  {"REBAR_GLOBAL_CACHE_DIR","/Users/benoitc/.cache/rebar3"},
                  {"REBAR_TEMPLATE_DIR",
                   "/Users/benoitc/.config/rebar3/templates"},
                  {"REBAR_APP_DIRS",
                   "/Users/benoitc/Projects/barrel-platform/_build/default/apps/*:/Users/benoitc/Projects/barrel-platform/_build/default/lib/*:/Users/benoitc/Projects/barrel-platform/_build/default/."},
                  {"REBAR_SRC_DIRS",[]},
                  {"ERLANG_ERTS_VER","7.1"},
                  {"ERLANG_ROOT_DIR","/Users/benoitc/local/otp/18.1.3"},
                  {"ERLANG_LIB_DIR_erl_interface",
                   "/Users/benoitc/local/otp/18.1.3/lib/erl_interface-3.8"},
                  {"ERLANG_LIB_VER_erl_interface","3.8"},
                  {"ERL","/Users/benoitc/local/otp/18.1.3/bin/erl"},
                  {"ERLC","/Users/benoitc/local/otp/18.1.3/bin/erlc"},
                  {"ERLANG_ARCH","64"},
                  {"ERLANG_TARGET","18.1.3-x86_64-apple-darwin15.0.0-64"}]},
            exit_status,
            {line,16384},
            use_stdio,stderr_to_stdout,hide,eof]

sh: line 0: exec: compile: not found
===> Hook for compile failed!

Missing top supervisor?

Hi Ulf,

I guess my question my actually not be an issue with setup, but I have a problem that I can't solve and it's somehow related to this library. I thought maybe you'll have some clue on why it happens.

I'm using Elixir and its Exrm library for generate a new release for my app and upgrade it on the fly. One of the requirements to make it happen is that all applications have a top-level supervisor. This is to ensure that they can handle failures probably. The issue is better described here: bitwalker/exrm#183

When upgrading I get the message release_handler: cannot find top supervisor for application setup

Do you maybe know if this is an issue with setup and can be fixed? Or maybe it's more Exrm problem?

Setup fails to build as hex dep of mix

Setup fails to build when used as a hex dependency in mix and compiled with rebar3 bare compiler. It can be compiled with rebar 2.6.2 from mix. The error with the following versions Erlang/OTP 20.0.4, Rebar 3.3.6 and Elixir 1.5.1, Setup 1.8.4 is:

./rebar skip_deps=true escriptize                                                                                                                   
make: ./rebar: No such file or directory                                                                                     
make: *** [escriptize] Error 1                                                                
===> Hook for compile failed!                                                     
                                                                                    
** (Mix) Could not compile dependency :setup, "/.mix/rebar3 bare compile --paths "/code/elixometer/_build/test/lib/*/ebin"" 
command failed. You can recompile this dependency with "mix deps.compile setup", update it with "mix deps.update setup" or clean it with "mix deps.c
lean setup"

Infinite loops during compile

I regularly have issues in some of my elixir projects where, when setup (1.4) starts compiling, it gets stuck in an infinite loop until it crashes the erlang VM.

....

===> Compiling setup
===> Verifying dependencies...
===> Compiling setup
src/setup.erl:476: Warning: a term is constructed, but never used

===> Verifying dependencies...
===> Compiling setup
src/setup.erl:476: Warning: a term is constructed, but never used

===> Verifying dependencies...
===> Compiling setup
src/setup.erl:476: Warning: a term is constructed, but never used

===> Verifying dependencies...
===> Compiling setup
src/setup.erl:476: Warning: a term is constructed, but never used

===> Verifying dependencies...
===> Compiling setup
src/setup.erl:476: Warning: a term is constructed, but never used

....

stop_when_done = true always triggers timeout

In setup_srv:run_setup/0 gen_server call has default timeout of 5 sec. At the end of setup:run_setup/0 in case of stop_when_done=true process sleeps for 5 seconds which leads to a timeout in setup_srv in any case and I guess next line to stop system gracefully will never be called.
My intention to use setup was to do some mnesia table preparation and some other stuff which might take much longer than 5 seconds.
I would do the timeout configurable to allow time consuming setup steps.
meike-hecker@aefeb8e
I am also not sure the sleep really makes sense here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.