erlef / rebar3_hex

Rebar3 Hex library
Apache License 2.0
101 stars 49 forks source link

Publishing wrong version #249

Closed jlouis closed 3 years ago

jlouis commented 3 years ago

This is a long stretch, since I don't have too much to go on, but I'm investigating.

When I want to publish fuse version 2.4.5 it publishes as version 2.4.0. This leads to errors on hex.pm since I'm trying to publish an older version. I'm on rebar3_hex version rebar3_hex (6.11.5) and 3.16.1 on Rebar3.

I've tried to investigate, but the code path is too long for me to pursue all the way, hence I'm going to ask:

How does rebar3_hex compute the version it proposes?

My fuse.app.src is set to "2.4.5". If I propose that to verl:parse(<<"2.4.5">>) it seems to parse it correctly. A git grep 2\.4\. in the repo doesn't even mention 2.4.0 so I'm a bit perplexed as to where it picks up and makes that decision.

How do I go about debugging this the easiest?

I don't know what code path to look at. And I don't know how to easiest add some tracing for this.

Workaround

My current workaround is to use rebar3 hex cut select "other" and plug in the version myself. But cut also picks up 2.4.0 as the current version and decides to use that as a base for major/minor/patch bumps.

tsloughter commented 3 years ago

@jlouis you sure you don't have a ./ebin/fuse.app at the top level of the project?

jlouis commented 3 years ago

@tsloughter oh! I did have exactly that. I'm guessing it's picking up that then?

tsloughter commented 3 years ago

Yea, rebar3 considers the app file in ebin to take precedence.

jlouis commented 3 years ago

Explains everything then. Thank you!