rebar3_hex icon indicating copy to clipboard operation
rebar3_hex copied to clipboard

Wrong config instructions

Open wojtekmach opened this issue 3 years ago • 5 comments

I tried following

http://rebar3.org/docs/package_management/hex_package_management/#config

but it doesn't work:

$ rebar3 hex api_url
===> Command api_url not found in namespace hex

$ rebar3 hex api_url http://localhost:4000
===> Command api_url not found in namespace hex

I'm on:

$ rebar3 version
rebar 3.14.2+build.4911.ref56039119 on Erlang/OTP 24 Erts 11.1.7

$ rebar3 plugins list
--- Global plugins ---
rebar3_hex (6.10.3)

wojtekmach avatar Feb 12 '21 12:02 wojtekmach

I was able to set the desired configuration by editing the config file:

%% ~/.config/rebar3/rebar.config
{plugins, [{rebar3_hex, {git, "git://github.com/tsloughter/rebar3_hex.git"}}]}.
{hex, [
  {repos, [
    #{
      name => <<"test_repo">>,
      api_key => <<"secret">>,
      api_url => <<"http://localhost:4000">>}]}]}.

wojtekmach avatar Feb 12 '21 12:02 wojtekmach

At the same time (@tsloughter, if you prefer I can open different issues), with rebar 3.14.3 on Erlang/OTP 21 Erts 10.3.5.15 + rebar3_hex 6.10.3:

rebar3 hex key -a
===> Uncaught error in rebar_core. Run with DIAGNOSTIC=1 to see stacktrace or consult rebar3.crashdump

paulo-ferraz-oliveira avatar Feb 12 '21 13:02 paulo-ferraz-oliveira

@wojtekmach Yeah, I think I'm going to do a PR to rebar3.org docs and to pull out all that documentation around commands that have yet to be implemented. It's quite confusing. Better to have no docs with a plan to get implemented vs docs out there that suggest "this should work" IMO.

starbelly avatar Mar 04 '21 01:03 starbelly

@paulo-ferraz-oliveira Yes, please open a separate issue so we can keep scope small. It should not crash.

starbelly avatar Mar 04 '21 01:03 starbelly

Will do.

paulo-ferraz-oliveira avatar Mar 04 '21 02:03 paulo-ferraz-oliveira