Replies: 4 comments 2 replies
-
the The documentation is probably unclear but the two options are mutually exclusive, and 'replace' needs to be first: rebar3/apps/rebar/src/rebar_hex_repos.erl Lines 82 to 96 in b62659b |
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply. I have removed {repos, List}, but the issue with
Would be also great to get some information about all hex repo map fields and what they are for. Especially how are they related to {'$repos',#{<<"hex-local">> =>
#{auth_key =>
<<"Bearer cmVmd...">>,
public_key =>
<<"-----BEGIN PUBLIC KEY-----...-----END PUBLIC KEY-----\n">>,
url =>
<<"https://somehost/artifactory/api/hex/hex-local">>,
fetch_public_key => nil},
<<"hexpm">> => #{url => <<"https://repo.hex.pm">>}}}.
|
Beta Was this translation helpful? Give feedback.
-
Can it be that: rebar3/apps/rebar/src/rebar_hex_repos.erl Lines 142 to 143 in b62659b Maps merge parameters order is incorrect; it appears as if default repo overwrite replacement. |
Beta Was this translation helpful? Give feedback.
-
Hello @ferd, rebar3/apps/rebar/src/rebar_hex_repos.erl Lines 133 to 140 in b62659b This function always overrides repo_url — regardless of whether it is already defined or what value it has — with either the default Hex.pm DEFAULT_CDN or the value of the HEX_CDN environment variable. This is problematic when overriding the default Hex.pm repo, since it forces me to also set Wouldn't it be more appropriate to only perform this override if Thanks ! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello team,
Context
~/.config/rebar3/rebar.config
and rely on therebar3_hex
plugin.Configuration
~/.config/rebar3/rebar.config
(sanitized):Reproduction steps
Observed behavior
In the diagnostic output,
api_url
is correctly replaced with the Artifactory endpoint, butrepo_url
remains set tohttps://repo.hex.pm
:Expected behavior
api_url
andrepo_url
for thehexpm
repository should be overridden so that index queries and tarball downloads come from Artifactory.rebar.lock
so the entire team resolves consistently.Questions
repo_url
override supported via{hex, [{repos, replace, [...]}]}
? If so, is there a different key that controls the tarball download host?repo_url
at its default (for examplerebar.lock
,~/.cache/rebar3/hex
, or registry metadata)? What is the proper way to clear or refresh it?~/.hex/hex.config
auth_key
map into rebar3 configuration? Areapi_key
andrepo_key
the correct fields for Artifactory, and should the values be inBearer <token>
form?hexpm
?Environment
Additional notes and attempts
hexpm
from the repo list and leaving only the local repo still showedrepo_url => https://repo.hex.pm
in diagnostics when the repo name ishexpm
.~/.cache/rebar3
and removingrebar.lock
did not change the behavior.api_url
andrepo_url
.Thanks for your help. If this belongs under
rebar3_hex
orhex_core
instead ofrebar3
, please let me know and I can refile.Beta Was this translation helpful? Give feedback.
All reactions