Skip to content
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

Add configuration keys for -v, --color #2397

Merged
merged 1 commit into from
Feb 26, 2016

Conversation

alexcrichton
Copy link
Member

This commit adds configuration keys for:

[term]
verbose = true
color = 'auto'

These are all meant to be proxies for the command line flags but configured on a
global basis if desired.

@rust-highfive
Copy link

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member Author

r? @brson

This is also similar to #2367, but doesn't have configuration for what color is emitted.

@rust-highfive rust-highfive assigned brson and unassigned huonw Feb 19, 2016
alexcrichton added a commit to alexcrichton/cargo that referenced this pull request Feb 19, 2016
This commit adds a more principled system to rationalize what ends up being a
configuration value versus an environment variable. This problem is solved by
just saying that they're one and the same! Similar to Bundler, this commit
supports overriding the `foo.bar` configuration value with the `CARGO_FOO_BAR`
environment variable.

Currently this is used as part of the `get_string` and `get_i64` methods on
`Config`. This means, for example, that the following environment variables can
now be used to configure Cargo:

* CARGO_BUILD_JOBS
* CARGO_HTTP_TIMEOUT
* CARGO_HTTP_PROXY

Currently it's not supported to encode a list in an environment variable, so for
example `CARGO_PATHS` would not be read when reading the global `paths`
configuration value.

cc rust-lang#2362
cc rust-lang#2395 -- intended to close this in tandem with rust-lang#2397
@alexcrichton
Copy link
Member Author

Got a chance to talk about this with @wycats today and the conclusions were:

  • Let's remove quiet for now as it doesn't seem well motivated beyond completeness
  • This can be particularly useful with Read configuration from environment variables #2398
  • We're in a bit of a phase where we may want to rethink how errors are printed in Cargo. It would be unfortunate if it becomes "conventional wisdom" to turn verbose mode on just to get better errors, that shouldn't be necessary.

bors added a commit that referenced this pull request Feb 26, 2016
This commit adds a more principled system to rationalize what ends up being a
configuration value versus an environment variable. This problem is solved by
just saying that they're one and the same! Similar to Bundler, this commit
supports overriding the `foo.bar` configuration value with the `CARGO_FOO_BAR`
environment variable.

Currently this is used as part of the `get_string` and `get_i64` methods on
`Config`. This means, for example, that the following environment variables can
now be used to configure Cargo:

* CARGO_BUILD_JOBS
* CARGO_HTTP_TIMEOUT
* CARGO_HTTP_PROXY

Currently it's not supported to encode a list in an environment variable, so for
example `CARGO_PATHS` would not be read when reading the global `paths`
configuration value.

cc #2362
cc #2395 -- intended to close this in tandem with #2397
@brson
Copy link
Contributor

brson commented Feb 26, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Feb 26, 2016

📌 Commit 575d67b has been approved by brson

@bors
Copy link
Contributor

bors commented Feb 26, 2016

🔒 Merge conflict

@bors
Copy link
Contributor

bors commented Feb 26, 2016

☔ The latest upstream changes (presumably #2398) made this pull request unmergeable. Please resolve the merge conflicts.

This commit adds configuration keys for:

    [term]
    verbose = true
    color = 'auto'

These are all meant to be proxies for the command line flags but configured on a
global basis if desired.
@alexcrichton alexcrichton changed the title Add configuration keys for -v, -q, --color Add configuration keys for -v, --color Feb 26, 2016
@alexcrichton
Copy link
Member Author

@bors: r=brson be48d5b

@bors
Copy link
Contributor

bors commented Feb 26, 2016

⌛ Testing commit be48d5b with merge 3efd44b...

bors added a commit that referenced this pull request Feb 26, 2016
This commit adds configuration keys for:

    [term]
    verbose = true
    color = 'auto'

These are all meant to be proxies for the command line flags but configured on a
global basis if desired.
@bors
Copy link
Contributor

bors commented Feb 26, 2016

@bors bors merged commit be48d5b into rust-lang:master Feb 26, 2016
@bors bors mentioned this pull request Feb 26, 2016
@alexcrichton alexcrichton deleted the config-verbose branch February 29, 2016 22:13
@alexcrichton alexcrichton added the relnotes Release-note worthy label Mar 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Release-note worthy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants