silviucpp / erlkaf

Erlang kafka driver based on librdkafka
MIT License
84 stars 41 forks source link

Error compiling last release using hex #55

Closed VitorTrin closed 1 year ago

VitorTrin commented 1 year ago

When I use hex and I add a dependency to the latest release like this

{:erlkaf, "~> 2.1.0"}

fetching the deps results in the following error

Error evaluating Rebar config script ./rebar.config.script:22: evaluation failed with reason error:{badmatch,{error,enoent}} and stacktrace [{erl_eval,expr,6,[{file,[101,114,108,95,101,118,97,108,46,101,114,108]},{line,496}]},{erl_eval,exprs,6,[{file,[101,114,108,95,101,118,97,108,46,101,114,108]},{line,136}]},{erl_eval,expr_list,7,[{file,[101,114,108,95,101,118,97,108,46,101,114,108]},{line,961}]},{erl_eval,expr,6,[{file,[101,114,108,95,101,118,97,108,46,101,114,108]},{line,472}]},{file,eval_stream2,6,[{file,[102,105,108,101,46,101,114,108]},{line,1504}]},{file,script,2,[{file,[102,105,108,101,46,101,114,108]},{line,1142}]},{'Elixir.File','cd!',2,[{file,[108,105,98,47,102,105,108,101,46,101,120]},{line,1607}]},{'Elixir.Mix.Rebar',eval_script,2,[{file,[108,105,98,47,109,105,120,47,114,101,98,97,114,46,101,120]},{line,191}]}]
Any dependencies defined in the script won't be available unless you add them to your Mix project

This does not happen if we add the dependency directly from the github like this:

{:erlkaf, github: "silviucpp/erlkaf"}

even though no changes happened to rebar config in the master since the last release

silviucpp commented 1 year ago

Hello Victor.

Can you please check if when you fetch using {:erlkaf, "~> 2.1.0"} you have rebar.config.script in the packet ?

This file shouldn't be there... I have no explanation how arrived in the packet..

silviucpp commented 1 year ago

Hmm.. I have no clue to what rebar.config.script makes reference.. because mine has less than 22 lines.. and also I don't see it included into the packet..

Have you tried to update to last rebar3 ?

VitorTrin commented 1 year ago

rebar3 --version gives me rebar 3.15.2 on Erlang/OTP 25 Erts 13.1.3 and surprisingly, no the file does not appear to be in the packet. This line 22 thing smells like a macro at work that expands the file

VitorTrin commented 1 year ago

It's probably https://github.com/fogfish/esq/issues/20

silviucpp commented 1 year ago

You are totally right ! But I don't see how can I fix this... I have no permissions on that library to update the hex package..

Silviu

silviucpp commented 1 year ago

@VitorTrin can you try {:erlkaf, "~> 2.1.1"} . I just published it.

Silviu

silviucpp commented 1 year ago

I published {:erlkaf, "~> 2.1.2"} as another problem with esq appeared.

silviucpp commented 1 year ago

Already received confirmation from another user that problem is solved.