-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config provider support #208
Comments
For reference (this is rebar3.org): http://rebar3.org/docs/package_management/hex_package_management/#config (I assume that's what you're talking about). Here's a comparison between the two:
Also:
And then:
Lemme know if I can help. |
I don't understand this.
I'd propose the former: keep stuff in |
Just to note, there's very little we can support out of the gate from the list above. We're limited to what hex_core support or what we implement, though some keys don't currently make sense in the context of rebar3_hex as rebar3 itself is responsible for actions pertaining to them, such as http_concurrency, cacerts_path, etc. In the end and for now the list of config keys we can support ends up being being :
This doesn't mean we shouldn't push out initial support, just noting. |
I never answered your question. Mix hex will place the values for the supported keys in global config. We don't have a global config concept in rebar3_hex and I'm not sure we should. Take this case for example, you set api_key, it goes into global config. If you have a repo entry for say hexpm and and a repo entry for my_own_super_private_self_hosted_hexpm how do we know which repos to apply Further, if we support being able to set api_key on hexpm:foo, then we'll never use api_key for hexpm, but in fact api_key should work across any org you have within a global repository, such as hexpm, I believe. Thus, I think it makes sense for us to support stuffing in key/values in parent repositories. Most of the time, this will only ever be hexpm for most people, so it acts like global config. But in the case you have two different parent repos, you'll need to specify which one the key/value it should be set on. Edit: I do think some options make sense globally, such as http_timeout, but these don't really apply to us like they do for mix hex, at least right now. |
Currently we have on rebar3.org docs around
config
commands. This has not been implemented yet. The config command should mirror mix hex as far as UX goes and should serve as a base line for implementation (https://hexdocs.pm/hex/Mix.Tasks.Hex.Config.html#content). One big note is that mix hex adds tuples to their global config file and it is applied to all repositories in config, this makes sense because mix hex only supports hexpm AFAIK. However, we can not do that so long as we support parent repos other than hexpm (which we currently do). I believe for this to work effectively a k/v will have to be placed into the parent repo and applied to all it's children. .There's another decision that has to be made : Do we cram all this into the existing rebar3_hex_config module or do we move those existing functions into say rebar_hex. I started going with the latter, but it might make sense to leave it all be.
The initial implementation should probably not bother with dealing with overrides.
The text was updated successfully, but these errors were encountered: