deadtrickster / prometheus.erl

Prometheus.io client in Erlang
MIT License
341 stars 117 forks source link

Blocked publication into hex.pm #122

Closed vkatsuba closed 3 years ago

vkatsuba commented 3 years ago

Hi All,

Not sure but the changes in the scope of https://github.com/deadtrickster/prometheus.erl/pull/116 looks like will block the publish prometheus.erl into hex.pm, please see docs for publish section Dependencies:(C) Only Hex packages may be used as dependencies of the package ...(at least there was the same problem in other libs which I'm tried to published :upside_down_face: using the same way). Issue in adding git deps instead of hex.pm deps:

{deps, [{quantile_estimator, {git, "https://github.com/odo/quantile_estimator"}}]}.

instead, eg(just example):

{deps, [{quantile_estimator, "0.0.0"}]}.

So, up to you :wink:.

Regards, --V

essen commented 3 years ago

Isn't that just when using mix?

vkatsuba commented 3 years ago

Isn't that just when using mix?

Not sure, I'm not use Elixir. But was issue with using rebar_hex - as I understand used the same API where before publishing provided some check on the side of the hex.pm for the presence of a dependency directly in the hex.pm. So, I suppose that the rebar_hex provide only response from hex.pm for case if deps is not exist in hex.pm based on API.

Based on https://github.com/erlef/rebar3_hex/blob/master/src/rebar3_hex_publish.erl#L351 looks like deps is not checked in rebar_hex before publishing, so the error will returned from hex.pm side.

I suppose the fix can be or publish dependency to the hex.pm or add this dependency to the profile in rebar.config, but not sure what need to do with mix.

deadtrickster commented 3 years ago

I forked it, uploaded to hex, and updated prometheus.erl. Should be enough?

vkatsuba commented 3 years ago

Should be enough?

Yep. Thanks.

vkatsuba commented 3 years ago

@deadtrickster one more point, you forgot update rebar.lock.

deadtrickster commented 3 years ago

haha, right! rebar3 lockfiles are difficult to me. I'm pretty sure I invoked rebar3 lock, but looks like I had to unlock first.

vkatsuba commented 3 years ago

Yep. Also not sure if this is important but in fork also missed link to GitHub in https://github.com/deadtrickster/quantile_estimator/blob/master/src/quantile_estimator.app.src, so by this reason in https://hex.pm/packages/quantile_estimator the link to fork on GitHub is not provided. Just need add something like:

    ...
    {links, [{"Github", "https://github.com/deadtrickster/quantile_estimator"}]}
    ...

to /src/quantile_estimator.app.src