rebar3_hex icon indicating copy to clipboard operation
rebar3_hex copied to clipboard

plugins upgrade don't upgrade globally installed plugins.

Open benoitc opened this issue 2 years ago • 4 comments

I am running latest rebar3

rebar3 --version
rebar 3.18.0 on Erlang/OTP 24 Erts 12.2

And trying to upgrade the plugin rebar3_hex :

➜  more ~/.config/rebar3/rebar.config
{plugins, [rebar3_hex, rebar3_run]}.

By running the command line DEBUG=1 rebar3 plugins upgrade rebar3_hex but rebar3 keeps returning the 6.11.4 version of it in the list of plugins (rebar plugins list).

The result of the upgrade:

DEBUG=1 rebar3 plugins upgrade rebar3_hex
===> Load global config file /Users/benoitc/.config/rebar3/rebar.config
===> 24.2 satisfies the requirement for minimum OTP version 18
===> Evaluating config script "/Users/benoitc/.cache/rebar3/plugins/hex_core/rebar.config.script"
===> Compile (apps)
===> Compile (apps)
===> Expanded command sequence to be run: []
===> Running provider: do
===> Expanded command sequence to be run: [{plugins,upgrade}]
===> Running provider: {plugins,upgrade}
===> Getting definition for package rebar3_hex from repo hexpm (#{api_url => <<"https://hex.pm/api">>,name => <<"hexpm">>,
         repo_name => <<"hexpm">>,repo_organization => undefined,
         repo_url => <<"https://repo.hex.pm">>,repo_verify => true,
         repo_verify_origin => true})
===> Fetching rebar3_hex v7.0.1
===> Making request to get package rebar3_hex from repo hexpm
===> Downloaded package rebar3_hex, caching at /Users/benoitc/.cache/rebar3/hex/hexpm/packages/rebar3_hex-7.0.1.tar
===> Writing {pkg,<<"rebar3_hex">>,<<"7.0.1">>,
                         <<"F1C30515446DBDD3C671C2F8607572C6CA159F02232B50D05AB702417776B4BC">>,
                         <<"F899F4E93727A5860EB66A299A4A3871A84CE06E97DB4C564FF0B2108669FA56">>,
                         #{api_url => <<"https://hex.pm/api">>,
                           name => <<"hexpm">>,repo_name => <<"hexpm">>,
                           repo_organization => undefined,
                           repo_url => <<"https://repo.hex.pm">>,
                           repo_verify => true,repo_verify_origin => true}} to cache at /Users/benoitc/.cache/rebar3/hex/hexpm/packages/rebar3_hex-7.0.1.tar
===> 24.2 satisfies the requirement for minimum OTP version 18
===> Fetching hex_core v0.8.4
===> Making request to get package hex_core from repo hexpm
===> Downloaded package hex_core, caching at /Users/benoitc/.cache/rebar3/hex/hexpm/packages/hex_core-0.8.4.tar
===> Writing {pkg,<<"hex_core">>,<<"0.8.4">>,
                         <<"FF38B56D164D5987962232C28D769661907B55CE1F058CAECA8E0C8CA5BD85C8">>,
                         <<"4B8C21FA049515D778395E38B0D0E5D48B7ECDC703BBA1F7007E2651292CE61A">>,
                         #{api_url => <<"https://hex.pm/api">>,
                           name => <<"hexpm">>,repo_name => <<"hexpm">>,
                           repo_organization => undefined,
                           repo_url => <<"https://repo.hex.pm">>,
                           repo_verify => true,repo_verify_origin => true}} to cache at /Users/benoitc/.cache/rebar3/hex/hexpm/packages/hex_core-0.8.4.tar
===> Evaluating config script "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/rebar.config.script"
===> Fetching verl v1.1.1
===> Making request to get package verl from repo hexpm
===> Downloaded package verl, caching at /Users/benoitc/.cache/rebar3/hex/hexpm/packages/verl-1.1.1.tar
===> Writing {pkg,<<"verl">>,<<"1.1.1">>,
                         <<"98F3EC48B943AA4AE8E29742DE86A7CD752513687911FE07D2E00ECDF3107E45">>,
                         <<"0925E51CD92A0A8BE271765B02430B2E2CFF8AC30EF24D123BD0D58511E8FB18">>,
                         #{api_url => <<"https://hex.pm/api">>,
                           name => <<"hexpm">>,repo_name => <<"hexpm">>,
                           repo_organization => undefined,
                           repo_url => <<"https://repo.hex.pm">>,
                           repo_verify => true,repo_verify_origin => true}} to cache at /Users/benoitc/.cache/rebar3/hex/hexpm/packages/verl-1.1.1.tar
===> 24.2 satisfies the requirement for minimum OTP version 19.3
===> Compile (plugins)
===> Running hooks for compile in app verl (/Users/benoitc/Projects/hackney/_build/default/plugins/verl) with configuration:
===> 	{pre_hooks, []}.
===> Running hooks for compile in app hex_core (/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core) with configuration:
===> 	{pre_hooks, []}.
===> Running hooks for compile in app rebar3_hex (/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex) with configuration:
===> 	{pre_hooks, []}.
===> Running hooks for erlc_compile in app verl (/Users/benoitc/Projects/hackney/_build/default/plugins/verl) with configuration:
===> 	{pre_hooks, []}.
===> Running hooks for erlc_compile in app hex_core (/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core) with configuration:
===> 	{pre_hooks, []}.
===> Running hooks for erlc_compile in app rebar3_hex (/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex) with configuration:
===> 	{pre_hooks, []}.
===> Analyzing applications...
===>      Compiled safe_erl_term.xrl
===> Compiling verl
===> compile options: {erl_opts, [debug_info,warn_missing_spec,
                                         warnings_as_errors]}.
===> files to analyze ["/Users/benoitc/Projects/hackney/_build/default/plugins/verl/src/verl.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/verl/src/verl_parser.erl"]
===>      Compiled verl.erl
===>      Compiled verl_parser.erl
===> Compiling hex_core
===> compile options: {erl_opts, [debug_info]}.
===> files to analyze ["/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_api_package.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_http.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_http_httpc.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_api_organization_member.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_api_package_owner.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_pb_names.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_licenses.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_pb_package.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_api.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_tarball.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_erl_tar.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_repo.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_registry.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_api_auth.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_pb_signed.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_core.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_pb_versions.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_api_organization.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/safe_erl_term.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_filename.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_api_key.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_api_user.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/src/hex_api_release.erl"]
===>      Compiled hex_http.erl
===>      Compiled hex_api_user.erl
===>      Compiled hex_api.erl
===>      Compiled hex_http_httpc.erl
===>      Compiled hex_api_key.erl
===>      Compiled hex_registry.erl
===>      Compiled hex_repo.erl
===>      Compiled hex_filename.erl
===>      Compiled hex_api_package_owner.erl
===>      Compiled hex_api_organization.erl
===>      Compiled hex_core.erl
===>      Compiled hex_tarball.erl
===>      Compiled hex_pb_signed.erl
===>      Compiled hex_api_package.erl
===>      Compiled hex_api_auth.erl
===>      Compiled hex_api_organization_member.erl
===>      Compiled hex_api_release.erl
===>      Compiled hex_licenses.erl
===>      Compiled safe_erl_term.erl
===>      Compiled hex_pb_versions.erl
===>      Compiled hex_pb_names.erl
===>      Compiled hex_pb_package.erl
===>      Compiled hex_erl_tar.erl
===> Compiling rebar3_hex
===> compile options: {erl_opts, [debug_info,
                                         {d,'POST_OTP_22'},
                                         {d,'POST_OTP_18'}]}.
===> files to analyze ["/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex/src/rebar3_hex_build.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex/src/rebar3_hex_httpc_adapter.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex/src/rebar3_hex_cut.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex/src/rebar3_hex_owner.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex/src/rebar3_hex_search.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex/src/rebar3_hex_config.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex/src/rebar3_hex_results.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex/src/rebar3_hex_organization.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex/src/rebar3_hex.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex/src/rebar3_hex_key.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex/src/rebar3_hex_retire.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex/src/rebar3_hex_error.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex/src/rebar3_hex_app.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex/src/rebar3_hex_publish.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex/src/rebar3_hex_version.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex/src/rebar3_hex_client.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex/src/rebar3_hex_user.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex/src/rebar3_hex_io.erl",
                              "/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex/src/rebar3_hex_file.erl"]
===>      Compiled rebar3_hex_error.erl
===>      Compiled rebar3_hex_httpc_adapter.erl
===>      Compiled rebar3_hex.erl
===>      Compiled rebar3_hex_file.erl
===>      Compiled rebar3_hex_results.erl
===>      Compiled rebar3_hex_retire.erl
===>      Compiled rebar3_hex_key.erl
===>      Compiled rebar3_hex_owner.erl
===>      Compiled rebar3_hex_version.erl
===>      Compiled rebar3_hex_io.erl
_build/default/plugins/rebar3_hex/src/rebar3_hex_organization.erl:391:5: Warning: public_key:ssh_encode/2 is deprecated and will be removed in OTP 26; use ssh_file:encode/2 instead

===>      Compiled rebar3_hex_organization.erl
===>      Compiled rebar3_hex_search.erl
===>      Compiled rebar3_hex_user.erl
===>      Compiled rebar3_hex_client.erl
===>      Compiled rebar3_hex_cut.erl
===>      Compiled rebar3_hex_app.erl
===>      Compiled rebar3_hex_config.erl
===>      Compiled rebar3_hex_build.erl
===>      Compiled rebar3_hex_publish.erl
===> Running hooks for erlc_compile in app verl (/Users/benoitc/Projects/hackney/_build/default/plugins/verl) with configuration:
===> 	{post_hooks, []}.
===> Running hooks for erlc_compile in app hex_core (/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core) with configuration:
===> 	{post_hooks, []}.
===> Running hooks for erlc_compile in app rebar3_hex (/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex) with configuration:
===> 	{post_hooks, []}.
===> Running hooks for app_compile in app verl (/Users/benoitc/Projects/hackney/_build/default/plugins/verl) with configuration:
===> 	{pre_hooks, []}.
===> Running hooks for app_compile in app hex_core (/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core) with configuration:
===> 	{pre_hooks, []}.
===> Running hooks for app_compile in app rebar3_hex (/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex) with configuration:
===> 	{pre_hooks, []}.
===> Running hooks for app_compile in app verl (/Users/benoitc/Projects/hackney/_build/default/plugins/verl) with configuration:
===> 	{post_hooks, []}.
===> Running hooks for app_compile in app hex_core (/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core) with configuration:
===> 	{post_hooks, []}.
===> Running hooks for app_compile in app rebar3_hex (/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex) with configuration:
===> 	{post_hooks, []}.
===> Running hooks for compile in app verl (/Users/benoitc/Projects/hackney/_build/default/plugins/verl) with configuration:
===> 	{post_hooks, []}.
===> Running hooks for compile in app hex_core (/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core) with configuration:
===> 	{post_hooks, []}.
===> Running hooks for compile in app rebar3_hex (/Users/benoitc/Projects/hackney/_build/default/plugins/rebar3_hex) with configuration:
===> 	{post_hooks, []}.
➜  hackney git:(master) ✗ DEBUG=1 rebar3 plugins list
===> Load global config file /Users/benoitc/.config/rebar3/rebar.config
===> 24.2 satisfies the requirement for minimum OTP version 18
===> Evaluating config script "/Users/benoitc/.cache/rebar3/plugins/hex_core/rebar.config.script"
===> Compile (apps)
===> Compile (apps)
===> Expanded command sequence to be run: []
===> Running provider: do
===> Expanded command sequence to be run: [{plugins,list}]
===> Running provider: {plugins,list}
===> Evaluating config script "/Users/benoitc/.cache/rebar3/plugins/hex_core/rebar.config.script"
--- Global plugins ---
rebar3_hex (6.11.4)
rebar3_run (0.3.0)

===> Evaluating config script "/Users/benoitc/Projects/hackney/_build/default/plugins/hex_core/rebar.config.script"

benoitc avatar Feb 13 '22 17:02 benoitc