ninenines / gun

HTTP/1.1, HTTP/2, Websocket client (and more) for Erlang/OTP.
ISC License
891 stars 232 forks source link

Compile-time warnings under rebar3 #259

Closed paulo-ferraz-oliveira closed 3 years ago

paulo-ferraz-oliveira commented 3 years ago

I get issued one warning of type:

===> WARNING: It is recommended to use {branch, Name}, {tag, Tag} or {ref, Ref},
otherwise updating the dep may not work as expected.

for cowlib.

Would you accept a pull request where "2.10.1" is updated to {git, "2.10.1"}?

Not doing that also seems to implicate (upon rebar3 upgrade) cowlib get constantly re-fetched/re-compiled, something which could be avoided.

essen commented 3 years ago

No because the file is automatically generated. I'm only welcome to a solution that modifies the generator code in Erlang.mk.

paulo-ferraz-oliveira commented 3 years ago

Sure. Any pointers on where I could start looking? I've never used Erlang.mk in the past, but am more than happy to.

essen commented 3 years ago

https://github.com/ninenines/erlang.mk/blob/master/core/compat.mk

The problem is knowing whether you're on a branch, tag, or other. Erlang.mk does not have this information.

paulo-ferraz-oliveira commented 3 years ago

Ah, I see, so you mean it's not worth tackling? Or simply that it would imply changes you'd prefer not be done in erlang.mk?

essen commented 3 years ago

Neither. Just saying you would have to figure out whether it's a branch, tag or ref while generating the rebar.config file, because this information is not available to Erlang.mk through configuration. Updating a branch for example is just a matter of deleting the relevant directory, so it's not useful information. Not sure if git provides an interface to know what type of object is referred to, but if it does I'm not against modifying the rebar.config generator to include this information.