uwiger / sext

Sortable Erlang Term Serialization
Apache License 2.0
105 stars 51 forks source link

sext doesn't build with rebar3: sext.beam not created #23

Closed benoitc closed 8 years ago

benoitc commented 8 years ago

To reproduce it, launch the following:

[sext] rebar3 compile
===> Verifying dependencies...
===> Compiling sext
[sext] ls _build/default/lib/sext/ebin
sext.app  tt_proto.beam

You can see that sext.beam doesn't exist

In verbose mode, you get the following log:

# Pastebin 0m0DlQBj
 Evaluating config script "rebar.config.script"
 Load global config file /Users/benoitc/.config/rebar3/rebar.config
 Expanded command sequence to be run: [{default,app_discovery},
                                                  {default,install_deps},
                                                  {default,lock},
                                                  {default,compile}]
 Evaluating config script "/Users/benoitc/Work/sext/rebar.config.script"
 Evaluating config script "/Users/benoitc/Work/sext/rebar.config.script"
===> Verifying dependencies...
 sh info:
    cwd: "/Users/benoitc/Work/sext"
    cmd: git rev-parse -q HEAD

    opts: [{cd,"/Users/benoitc/Work/sext/_build/default/lib/edown"}]

 Port Cmd: git rev-parse -q HEAD
Port Opts: [{cd,"/Users/benoitc/Work/sext/_build/default/lib/edown"},
            exit_status,
            {line,16384},
            use_stdio,stderr_to_stdout,hide,eof]

 Comparing git ref d864427506cd93a00712b7c3b9a89d793e7e1600 with d864427506cd93a00712b7c3b9a89d793e7e1600
 sh info:
    cwd: "/Users/benoitc/Work/sext"
    cmd: git --git-dir="/Users/benoitc/Work/sext/_build/default/lib/edown/.git" rev-parse --verify HEAD

    opts: [{use_stdout,false},
                       {debug_abort_on_error,
                           [76,111,99,107,105,110,103,32,111,102,32,103,105,
                            116,32,100,101,112,101,110,100,101,110,99,121,32,
                            102,97,105,108,101,100,32,105,110,32,
                            "/Users/benoitc/Work/sext/_build/default/lib/edown"]}]

 Port Cmd: git --git-dir="/Users/benoitc/Work/sext/_build/default/lib/edown/.git" rev-parse --verify HEAD
Port Opts: [exit_status,{line,16384},use_stdio,stderr_to_stdout,hide,eof]

 run_hooks("/Users/benoitc/Work/sext", pre_hooks, compile) -> no hooks defined

===> Compiling sext
 run_hooks("/Users/benoitc/Work/sext", pre_hooks, compile) -> no hooks defined

 run_hooks("/Users/benoitc/Work/sext", pre_hooks, erlc_compile) -> no hooks defined

 erlopts [debug_info,debug_info]
 files to compile ["/Users/benoitc/Work/sext/_build/default/lib/sext/examples/tt_proto.erl"]
 run_hooks("/Users/benoitc/Work/sext", post_hooks, erlc_compile) -> no hooks defined

 run_hooks("/Users/benoitc/Work/sext", pre_hooks, app_compile) -> no hooks defined

 sh info:
    cwd: "/Users/benoitc/Work/sext"
    cmd: git log -n 1 --pretty=format:"%h
" 

    opts: [{use_stdout,false},
                       return_on_error,
                       {cd,"/Users/benoitc/Work/sext"}]

 Port Cmd: git log -n 1 --pretty=format:"%h
" 
Port Opts: [{cd,"/Users/benoitc/Work/sext"},
            exit_status,
            {line,16384},
            use_stdio,stderr_to_stdout,hide,eof]

 sh info:
    cwd: "/Users/benoitc/Work/sext"
    cmd: git log --oneline --no-walk --tags --decorate

    opts: [{use_stdout,false},
                       return_on_error,
                       {cd,"/Users/benoitc/Work/sext"}]

 Port Cmd: git log --oneline --no-walk --tags --decorate
Port Opts: [{cd,"/Users/benoitc/Work/sext"},
            exit_status,
            {line,16384},
            use_stdio,stderr_to_stdout,hide,eof]

 sh info:
    cwd: "/Users/benoitc/Work/sext"
    cmd: git describe --tags --abbrev=0

    opts: [{use_stdout,false},
                       return_on_error,
                       {cd,"/Users/benoitc/Work/sext"}]

 Port Cmd: git describe --tags --abbrev=0
Port Opts: [{cd,"/Users/benoitc/Work/sext"},
            exit_status,
            {line,16384},
            use_stdio,stderr_to_stdout,hide,eof]

 sh info:
    cwd: "/Users/benoitc/Work/sext"
    cmd: git rev-list HEAD

    opts: [{use_stdout,false},
                       {cd,"/Users/benoitc/Work/sext"},
                       {debug_abort_on_error,
                           "Getting rev-list of git depedency failed in /Users/benoitc/Work/sext"}]

 Port Cmd: git rev-list HEAD
Port Opts: [{cd,"/Users/benoitc/Work/sext"},
            exit_status,
            {line,16384},
            use_stdio,stderr_to_stdout,hide,eof]

 run_hooks("/Users/benoitc/Work/sext", post_hooks, app_compile) -> no hooks defined

 run_hooks("/Users/benoitc/Work/sext", post_hooks, compile) -> no hooks defined

 run_hooks("/Users/benoitc/Work/sext", post_hooks, compile) -> no hooks defined

Removing edown from the build fixed the issue, so it may be just an issue with edown.

uwiger commented 8 years ago

Have you tried the latest sext master?

benoitc commented 8 years ago

yes i did. the patch is on top of it :) On Wed, 4 May 2016 at 18:15, Ulf Wiger notifications@github.com wrote:

Have you tried the latest sext master?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/uwiger/sext/issues/23#issuecomment-216916642

uwiger commented 8 years ago

I can't reproduce it.

uwpro:tmp uwiger$ git clone git@github.com:uwiger/sext.git
Cloning into 'sext'...
...
uwpro:tmp uwiger$ cd sext
uwpro:sext uwiger$ which erl
/Users/uwiger/lib/otp/18.3/bin/erl
uwpro:sext uwiger$ rebar3 compile
===> Fetching pc ({pkg,<<"pc">>,<<"1.2.0">>})
===> Version cached at /Users/uwiger/.cache/rebar3/hex/default/packages/pc-1.2.0.tar is up to date, reusing it
===> Compiling pc
===> Verifying dependencies...
===> Fetching edown ({git,"git://github.com/uwiger/edown.git","HEAD"})
===> WARNING: It is recommended to use {branch, Name}, {tag, Tag} or {ref, Ref}, otherwise updating the dep may not work as expected.
===> Compiling edown
===> Compiling sext
===> Linking priv/sext_drv.so
/Users/uwiger/tmp/sext/_build/default/lib/sext/src/sext.erl:231: Warning: function pp/1 is unused

uwpro:sext uwiger$ ls _build/default/lib/sext/ebin/
sext.app    sext.beam   tt_proto.beam
benoitc commented 8 years ago

try with the rebar isnatlled locally (rebar3 local install) it should reproduce the issue On Wed, 4 May 2016 at 18:45, Ulf Wiger notifications@github.com wrote:

I can't reproduce it.

uwpro:tmp uwiger$ git clone git@github.com:uwiger/sext.git Cloning into 'sext'... ... uwpro:tmp uwiger$ cd sext uwpro:sext uwiger$ which erl /Users/uwiger/lib/otp/18.3/bin/erl uwpro:sext uwiger$ rebar3 compile ===> Fetching pc ({pkg,<<"pc">>,<<"1.2.0">>}) ===> Version cached at /Users/uwiger/.cache/rebar3/hex/default/packages/pc-1.2.0.tar is up to date, reusing it ===> Compiling pc ===> Verifying dependencies... ===> Fetching edown ({git,"git://github.com/uwiger/edown.git","HEAD"}) ===> WARNING: It is recommended to use {branch, Name}, {tag, Tag} or {ref, Ref}, otherwise updating the dep may not work as expected. ===> Compiling edown ===> Compiling sext ===> Linking priv/sext_drv.so /Users/uwiger/tmp/sext/_build/default/lib/sext/src/sext.erl:231: Warning: function pp/1 is unused

uwpro:sext uwiger$ ls _build/default/lib/sext/ebin/ sext.app sext.beam tt_proto.beam

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/uwiger/sext/issues/23#issuecomment-216926062

uwiger commented 8 years ago

My rebar3 version:

uwpro:sext uwiger$ rebar3 --version
rebar 3.0.0+build.3380.reff7d88a5 on Erlang/OTP 18 Erts 7.3.1

But if this is rebar3 version-dependent, perhaps it's more of an issue with rebar3 than with sext?

uwiger commented 8 years ago

Ok, sorry, was doing several things at the same time.

Could you make a proper PR of it?

benoitc commented 8 years ago

what do you mean by proper PR ?