-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
Rework specifying and layering of configuration #332
Comments
In GitLab by @ericvw on Dec 29, 2019, 07:32 I should note that this was inspired by how |
In GitLab by @ericvw on Dec 29, 2019, 07:34 changed the description |
In GitLab by @asottile on Dec 29, 2019, 07:40 Looks good, I think
|
In GitLab by @ericvw on Dec 29, 2019, 09:06
Sounds reasonable. Would you like me to make that deprecation on a maintenance branch or apply directly to
This is true — when With today's behavior, one can specify
Correct. This behavior change with respect to Maybe this table will help:
With the proposed changes, the usage of |
In GitLab by @sigmavirus24 on Dec 29, 2019, 10:41
This is what I'm most concerned about. The existing behaviour of |
In GitLab by @sigmavirus24 on Dec 29, 2019, 10:42 Also, for the last entry in your table, I believe but can't recall that |
In GitLab by @ericvw on Dec 29, 2019, 14:04
Hmm... I see the concern. How about the following tweaked proposal... For the 3.x release series:
For the 4.x release series:
This would provide a migration path for enabling users to be notified and opt-in to the new specified behavior, while still being able to retain the existing behavior as well. Thoughts?
When looking at When verifying this while also running |
In GitLab by @ericvw on Dec 29, 2019, 14:31
Created issue #605 for this and the fix in merge request !395. |
In GitLab by @ericvw on Dec 29, 2019, 16:21 changed the description |
In GitLab by @ericvw on Dec 29, 2019, 07:30
After having spent some time making changes in CLI parsing, the configuration
file loading, and the layering of the configuration options, I would like to
simplify how configuration gets specified and layered. I wanted to raise this
issue for awareness and discussion before proceeding with this larger goal.
The user-facing would be the following:
--config
to be used multiple times for specifying configurationfiles. Options in subsequent
--config
file take precedence. The commandline arguments in the configuration files will be used as if they were
provided first on the command line before other options that are specified on
the command line.
--append-config
in favor of--config
now that--config
can bespecified multiple times.
--isolated
to ignore the automatic detection of configuration (i.e.,user configuration and the searching-up-the-paths configuration). However,
--config
may be specified with--isolated
to provide files to be parsed.Below are the behaviors expected if the above changes were implemented:
With these changes, the benefits are the following:
--config
are just appended to a single list to beparsed. If
--isolated
is not specified, elide the user and local filesincluded in the list of configuration files to parse.
configuration is exactly the same.
--isolated
present, there is still an elegant way to specify a set ofconfiguration options via file without having to put them all on the command
line.
The following trade-offs are the following:
--append-config
.--isolated
to allow--config
in addition to.--config
to be specified multiple times.@asottile and @sigmavirus24, would greatly appreciate your input and feedback
before I proceed forward. Thanks!
The text was updated successfully, but these errors were encountered: