Vagabond / erlang-syslog

Erlang port driver for interacting with syslog via syslog(3)
Other
87 stars 56 forks source link

rebar2 get-deps fails #24

Open mrbegood opened 7 years ago

mrbegood commented 7 years ago

Hi, this commit https://github.com/Vagabond/erlang-syslog/commit/964310d0c0f9b784d784b432a176b61f39d1f41b breaks dependency compilation with rebar2

rebar version
rebar 2.6.4 17 20160926_070944 git 2.6.4-4-g576e121  

rebar get-deps

...

==> lager_syslog (get-deps)
Pulling syslog from {git,"git://github.com/Vagabond/erlang-syslog",
                         {branch,"master"}}
Cloning into 'syslog'...
Uncaught error in rebar_core: {'EXIT',
                               {function_clause,
                                [{code,which,
                                  [{pc,
                                    {git,
                                     "git@github.com:blt/port_compiler.git",
                                     {branch,"master"}}}],
                                  [{file,"code.erl"},{line,719}]},
                                 {rebar_core,'-plugin_modules/3-lc$^0/1-0-',
                                  1,
                                  [{file,"src/rebar_core.erl"},{line,573}]},
                                 {rebar_core,plugin_modules,3,
                                  [{file,"src/rebar_core.erl"},{line,573}]},
                                 {rebar_core,process_dir1,7,
                                  [{file,"src/rebar_core.erl"},{line,244}]},
                                 {rebar_core,process_each,5,
                                  [{file,"src/rebar_core.erl"},{line,351}]},
                                 {rebar_core,process_dir1,7,
                                  [{file,"src/rebar_core.erl"},{line,271}]},
                                 {rebar_core,process_each,5,
                                  [{file,"src/rebar_core.erl"},{line,351}]},

To re-produce problem you can try to build this app
https://github.com/esl/MongooseIM

mkdir -p /tmp/mongooseim \
&& cd /tmp/mongooseim \
&& git clone git@github.com:esl/MongooseIM.git . \
&& ./tools/configure \
&& make rel

When adding dependency to this commit https://github.com/Vagabond/erlang-syslog/commit/e24c9ee8f7bb3f066ec152c210af10c2c712759a in rebar.config

{syslog, ".*", {git, "git://github.com/Vagabond/erlang-syslog", "e24c9ee"}}

rebar get-deps works good.

Vagabond commented 7 years ago

cc @binarytemple-bet365

binarytemple-external commented 7 years ago

@mrbegood - The project has moved to rebar3, so master will not compile with rebar, as the dependencies format is different (rebar is deprecated in any case).

However I don't think that is the problem here. I initially suspected that MongooseIM might have a dependency upon erlang-syslog master but it doesn't seem to be so:

Examining MongooseIM master:

MongooseIM has the following dependency on lager_syslog:

 {lager_syslog, ".*", {git, "git://github.com/basho/lager_syslog.git", "3.0.3"}},

lager_syslog in turn has the followowing dependency on erlang-syslog:

{'syslog', "1.0.*", {git, "https://github.com/basho/erlang-syslog", {tag, "1.0.3"}}}

So to test (I can't actually build MongooseIM due to it's fast_tls dependency choking on EC support):

% git clone https://github.com/basho/erlang-syslog     
Cloning into 'erlang-syslog'...                                                  
remote: Counting objects: 177, done.                                             
remote: Total 177 (delta 0), reused 0 (delta 0), pack-reused 177                 
Receiving objects: 100% (177/177), 210.40 KiB | 0 bytes/s, done.                 
Resolving deltas: 100% (75/75), done.                                            
% cd erlang-syslog                                     

% git checkout 1.0.3                     
Note: checking out '1.0.3'.                                                      

etc etc etc...                                                                                 

HEAD is now at e24c9ee... Roll 1.0.3                                             

% ./rebar compile                          
==> erlang-syslog (compile)                                                      
Compiled src/syslog_app.erl                                                      
Compiled src/syslog_sup.erl                                                      
Compiled src/syslog.erl                                                          
Compiling c_src/syslog_drv.c                                                     
%                                        

Can you perform a fresh checkout of MongooseIM and try again please?

binarytemple-external commented 7 years ago

@mrbegood Has your issue been fixed by this @michalwski P/R ?

If so, we can close this ticket.

binarytemple-external commented 7 years ago

@mrbegood - in any event we have this P/R from @vavaka which will make this project work with rebar and rebar3 - https://github.com/Vagabond/erlang-syslog/pull/25

binarytemple-external commented 7 years ago

@mrbegood merged to master, please test and close.

tsloughter commented 4 years ago

rebar2 is no longer supported. This issue should be closed.