ninenines / erlang.mk

A build tool for Erlang that just works.
https://erlang.mk
ISC License
578 stars 241 forks source link

Auto-patching rebar project fails when version string starts with ">=" #938

Closed lukebakken closed 1 year ago

lukebakken commented 2 years ago

To demonstrate, clone https://github.com/lukebakken/gt-eq-dep-version and run make. When gen_smtp is auto-patched, this configuration in deps/gen_smtp/rebar.config trips up erlang.mk:

{deps, [{ranch, ">= 1.8.0"},
        {hut, "1.3.0"}]}.

...because it is turned into this in the generated Makefile

DEPS += ranch
dep_ranch = hex >= 1.8.0 ranch

I believe I need to expand the semver strings parsed by this code.

Found while working on https://github.com/gotthardp/rabbitmq-email/issues/45

essen commented 2 years ago

Yes it just hasn't been implemented. You can add an autopatch-gen_smtp:: target after include erlang.mk to correct this after autopatch has run.

lukebakken commented 2 years ago

Thanks @essen. If you haven't yet started on supporting additional semver strings let me know, I could spend some time on that.

essen commented 2 years ago

I have nothing in progress but there is probably some hacky support in the autopatch code.

essen commented 1 year ago

This should be done now.