Add support for customizing JSON diagnostics from Cargo

Cargo has of #7143 enabled pipelined compilation by default which
affects how the compiler is invoked, especially with respect to JSON
messages. This, in some testing, has proven to cause quite a few issues
with rustbuild's current integration with Cargo. This commit is aimed at
adding features to Cargo to solve this issue.

This commit adds the ability to customize the stream of JSON messages
coming from Cargo. The new feature for Cargo is that it now also mirrors
rustc in how you can configure the JSON stream. Multiple
`--message-format` arguments are now supported and the value specified
is a comma-separated list of directives. In addition to the existing
`human`, `short`, and `json` directives these new directives have been
added:

* `json-render-diagnostics` - instructs Cargo to render rustc
  diagnostics and only print out JSON messages for artifacts and Cargo
  things.

* `json-diagnostic-short` - indicates that the `rendered` field of rustc
  diagnostics should use the "short" rendering.

* `json-diagnostic-rendered-ansi` - indicates that the `rendered` field of rustc
  diagnostics should embed ansi color codes.

The first option here, `json-render-diagnostics`, will be used by
rustbuild unconditionally. Additionally `json-diagnostic-short` will be
conditionally used based on the input to rustbuild itself.

This should be enough for external tools to customize how Cargo is
invoked and how all kinds of JSON diagnostics get printed, and it's
thought that we can relatively easily tweak this as necessary to extend
it and such.
This commit is contained in:
Alex Crichton 2019-08-05 09:42:28 -07:00
parent fe7b4275d3
commit 45699e9f21
50 changed files with 974 additions and 228 deletions

View File

@ -5,10 +5,20 @@
### Added ### Added
- Cargo build pipelining has been enabled by default to leverage more idle CPU
parallelism during builds.
[#7143](https://github.com/rust-lang/cargo/pull/7143)
- The `--message-format` option to Cargo can now be specified multiple times and
accepts a comma-separated list of values. In addition to the previous values
it also now accepts `json-diagnostic-short` and
`json-diagnostic-rendered-ansi` which configures the output coming from rustc
in `json` message mode.
[#7214](https://github.com/rust-lang/cargo/pull/7214)
### Changed ### Changed
### Fixed ### Fixed
- (Nightly only): Fixed exponential blowup when using CARGO_BUILD_PIPELINING. - (Nightly only): Fixed exponential blowup when using `CARGO_BUILD_PIPELINING`.
[#7062](https://github.com/rust-lang/cargo/pull/7062) [#7062](https://github.com/rust-lang/cargo/pull/7062)
- Fixed using the wrong directory when updating git repositories when using - Fixed using the wrong directory when updating git repositories when using
the `git-fetch-with-cli` config option, and the `GIT_DIR` environment the `git-fetch-with-cli` config option, and the `GIT_DIR` environment

View File

@ -112,7 +112,10 @@ impl BuildConfig {
/// Whether or not the *user* wants JSON output. Whether or not rustc /// Whether or not the *user* wants JSON output. Whether or not rustc
/// actually uses JSON is decided in `add_error_format`. /// actually uses JSON is decided in `add_error_format`.
pub fn emit_json(&self) -> bool { pub fn emit_json(&self) -> bool {
self.message_format == MessageFormat::Json match self.message_format {
MessageFormat::Json { .. } => true,
_ => false,
}
} }
pub fn test(&self) -> bool { pub fn test(&self) -> bool {
@ -123,7 +126,17 @@ impl BuildConfig {
#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum MessageFormat { pub enum MessageFormat {
Human, Human,
Json, Json {
/// Whether rustc diagnostics are rendered by cargo or included into the
/// output stream.
render_diagnostics: bool,
/// Whether the `rendered` field of rustc diagnostics are using the
/// "short" rendering.
short: bool,
/// Whether the `rendered` field of rustc diagnostics embed ansi color
/// codes.
ansi: bool,
},
Short, Short,
} }

View File

@ -754,21 +754,40 @@ fn add_error_format_and_color(
if pipelined { if pipelined {
json.push_str(",artifacts"); json.push_str(",artifacts");
} }
if cx.bcx.build_config.message_format == MessageFormat::Short { match cx.bcx.build_config.message_format {
MessageFormat::Short | MessageFormat::Json { short: true, .. } => {
json.push_str(",diagnostic-short"); json.push_str(",diagnostic-short");
} }
_ => {}
}
cmd.arg(json); cmd.arg(json);
} else { } else {
let mut color = true;
match cx.bcx.build_config.message_format { match cx.bcx.build_config.message_format {
MessageFormat::Human => (), MessageFormat::Human => (),
MessageFormat::Json => { MessageFormat::Json {
ansi,
short,
render_diagnostics,
} => {
cmd.arg("--error-format").arg("json"); cmd.arg("--error-format").arg("json");
// If ansi is explicitly requested, enable it. If we're
// rendering diagnostics ourselves then also enable it because
// we'll figure out what to do with the colors later.
if ansi || render_diagnostics {
cmd.arg("--json=diagnostic-rendered-ansi");
}
if short {
cmd.arg("--json=diagnostic-short");
}
color = false;
} }
MessageFormat::Short => { MessageFormat::Short => {
cmd.arg("--error-format").arg("short"); cmd.arg("--error-format").arg("short");
} }
} }
if color {
let color = if cx.bcx.config.shell().supports_color() { let color = if cx.bcx.config.shell().supports_color() {
"always" "always"
} else { } else {
@ -776,6 +795,7 @@ fn add_error_format_and_color(
}; };
cmd.args(&["--color", color]); cmd.args(&["--color", color]);
} }
}
Ok(()) Ok(())
} }
@ -1094,9 +1114,8 @@ impl Kind {
} }
struct OutputOptions { struct OutputOptions {
/// Get the `"rendered"` field from the JSON output and display it on /// What format we're emitting from Cargo itself.
/// stderr instead of the JSON message. format: MessageFormat,
extract_rendered_messages: bool,
/// Look for JSON message that indicates .rmeta file is available for /// Look for JSON message that indicates .rmeta file is available for
/// pipelined compilation. /// pipelined compilation.
look_for_metadata_directive: bool, look_for_metadata_directive: bool,
@ -1110,7 +1129,6 @@ struct OutputOptions {
impl OutputOptions { impl OutputOptions {
fn new<'a>(cx: &Context<'a, '_>, unit: &Unit<'a>) -> OutputOptions { fn new<'a>(cx: &Context<'a, '_>, unit: &Unit<'a>) -> OutputOptions {
let extract_rendered_messages = cx.bcx.build_config.message_format != MessageFormat::Json;
let look_for_metadata_directive = cx.rmeta_required(unit); let look_for_metadata_directive = cx.rmeta_required(unit);
let color = cx.bcx.config.shell().supports_color(); let color = cx.bcx.config.shell().supports_color();
let cache_cell = if cx.bcx.build_config.cache_messages() { let cache_cell = if cx.bcx.build_config.cache_messages() {
@ -1122,7 +1140,7 @@ impl OutputOptions {
None None
}; };
OutputOptions { OutputOptions {
extract_rendered_messages, format: cx.bcx.build_config.message_format,
look_for_metadata_directive, look_for_metadata_directive,
color, color,
cache_cell, cache_cell,
@ -1179,12 +1197,19 @@ fn on_stderr_line(
} }
}; };
// In some modes of compilation Cargo switches the compiler to JSON mode // Depending on what we're emitting from Cargo itself, we figure out what to
// but the user didn't request that so we still want to print pretty rustc // do with this JSON message.
// colorized diagnostics. In those cases (`extract_rendered_messages`) we match options.format {
// take a look at the JSON blob we go, see if it's a relevant diagnostics, // In the "human" output formats (human/short) or if diagnostic messages
// and if so forward just that diagnostic for us to print. // from rustc aren't being included in the output of Cargo's JSON
if options.extract_rendered_messages { // messages then we extract the diagnostic (if present) here and handle
// it ourselves.
MessageFormat::Human
| MessageFormat::Short
| MessageFormat::Json {
render_diagnostics: true,
..
} => {
#[derive(serde::Deserialize)] #[derive(serde::Deserialize)]
struct CompilerMessage { struct CompilerMessage {
rendered: String, rendered: String,
@ -1206,14 +1231,13 @@ fn on_stderr_line(
state.stderr(rendered); state.stderr(rendered);
return Ok(()); return Ok(());
} }
} else { }
// Remove color information from the rendered string. rustc has not
// included color in the past, so to avoid breaking anything, strip it // Remove color information from the rendered string. When pipelining is
// out when --json=diagnostic-rendered-ansi is used. This runs // enabled and/or when cached messages are enabled we're always asking
// unconditionally under the assumption that Cargo will eventually // for ANSI colors from rustc, so unconditionally postprocess here and
// move to this as the default mode. Perhaps in the future, cargo // remove ansi color codes.
// could allow the user to enable/disable color (such as with a MessageFormat::Json { ansi: false, .. } => {
// `--json` or `--color` or `--message-format` flag).
#[derive(serde::Deserialize, serde::Serialize)] #[derive(serde::Deserialize, serde::Serialize)]
struct CompilerMessage { struct CompilerMessage {
rendered: String, rendered: String,
@ -1230,6 +1254,11 @@ fn on_stderr_line(
} }
} }
// If ansi colors are desired then we should be good to go! We can just
// pass through this message as-is.
MessageFormat::Json { ansi: true, .. } => {}
}
// In some modes of execution we will execute rustc with `-Z // In some modes of execution we will execute rustc with `-Z
// emit-artifact-notifications` to look for metadata files being produced. When this // emit-artifact-notifications` to look for metadata files being produced. When this
// happens we may be able to start subsequent compilations more quickly than // happens we may be able to start subsequent compilations more quickly than
@ -1278,12 +1307,8 @@ fn replay_output_cache(
color: bool, color: bool,
) -> Work { ) -> Work {
let target = target.clone(); let target = target.clone();
let extract_rendered_messages = match format {
MessageFormat::Human | MessageFormat::Short => true,
MessageFormat::Json => false,
};
let mut options = OutputOptions { let mut options = OutputOptions {
extract_rendered_messages, format,
look_for_metadata_directive: false, look_for_metadata_directive: false,
color, color,
cache_cell: None, cache_cell: None,

View File

@ -1,7 +1,3 @@
use std::ffi::{OsStr, OsString};
use std::fs;
use std::path::PathBuf;
use crate::core::compiler::{BuildConfig, MessageFormat}; use crate::core::compiler::{BuildConfig, MessageFormat};
use crate::core::Workspace; use crate::core::Workspace;
use crate::ops::{CompileFilter, CompileOptions, NewOptions, Packages, VersionControl}; use crate::ops::{CompileFilter, CompileOptions, NewOptions, Packages, VersionControl};
@ -14,6 +10,10 @@ use crate::util::{
}; };
use crate::CargoResult; use crate::CargoResult;
use clap::{self, SubCommand}; use clap::{self, SubCommand};
use failure::bail;
use std::ffi::{OsStr, OsString};
use std::fs;
use std::path::PathBuf;
pub use crate::core::compiler::CompileMode; pub use crate::core::compiler::CompileMode;
pub use crate::{CliError, CliResult, Config}; pub use crate::{CliError, CliResult, Config};
@ -134,13 +134,7 @@ pub trait AppExt: Sized {
} }
fn arg_message_format(self) -> Self { fn arg_message_format(self) -> Self {
self._arg( self._arg(multi_opt("message-format", "FMT", "Error format"))
opt("message-format", "Error format")
.value_name("FMT")
.case_insensitive(true)
.possible_values(&["human", "json", "short"])
.default_value("human"),
)
} }
fn arg_build_plan(self) -> Self { fn arg_build_plan(self) -> Self {
@ -301,23 +295,70 @@ pub trait ArgMatchesExt {
self._values_of("package"), self._values_of("package"),
)?; )?;
let message_format = match self._value_of("message-format") { let mut message_format = None;
None => MessageFormat::Human, let default_json = MessageFormat::Json {
Some(f) => { short: false,
if f.eq_ignore_ascii_case("json") { ansi: false,
MessageFormat::Json render_diagnostics: false,
} else if f.eq_ignore_ascii_case("human") {
MessageFormat::Human
} else if f.eq_ignore_ascii_case("short") {
MessageFormat::Short
} else {
panic!("Impossible message format: {:?}", f)
}
}
}; };
for fmt in self._values_of("message-format") {
for fmt in fmt.split(',') {
let fmt = fmt.to_ascii_lowercase();
match fmt.as_str() {
"json" => {
if message_format.is_some() {
bail!("cannot specify two kinds of `message-format` arguments");
}
message_format = Some(default_json);
}
"human" => {
if message_format.is_some() {
bail!("cannot specify two kinds of `message-format` arguments");
}
message_format = Some(MessageFormat::Human);
}
"short" => {
if message_format.is_some() {
bail!("cannot specify two kinds of `message-format` arguments");
}
message_format = Some(MessageFormat::Short);
}
"json-render-diagnostics" => {
if message_format.is_none() {
message_format = Some(default_json);
}
match &mut message_format {
Some(MessageFormat::Json {
render_diagnostics, ..
}) => *render_diagnostics = true,
_ => bail!("cannot specify two kinds of `message-format` arguments"),
}
}
"json-diagnostic-short" => {
if message_format.is_none() {
message_format = Some(default_json);
}
match &mut message_format {
Some(MessageFormat::Json { short, .. }) => *short = true,
_ => bail!("cannot specify two kinds of `message-format` arguments"),
}
}
"json-diagnostic-rendered-ansi" => {
if message_format.is_none() {
message_format = Some(default_json);
}
match &mut message_format {
Some(MessageFormat::Json { ansi, .. }) => *ansi = true,
_ => bail!("cannot specify two kinds of `message-format` arguments"),
}
}
s => bail!("invalid message format specifier: `{}`", s),
}
}
}
let mut build_config = BuildConfig::new(config, self.jobs()?, &self.target(), mode)?; let mut build_config = BuildConfig::new(config, self.jobs()?, &self.target(), mode)?;
build_config.message_format = message_format; build_config.message_format = message_format.unwrap_or(MessageFormat::Human);
build_config.release = self._is_present("release"); build_config.release = self._is_present("release");
build_config.build_plan = self._is_present("build-plan"); build_config.build_plan = self._is_present("build-plan");
if build_config.build_plan { if build_config.build_plan {

View File

@ -301,17 +301,33 @@ terminal.</p>
</dd> </dd>
<dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt> <dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt>
<dd> <dd>
<p>The output format for diagnostic messages. Valid values:</p> <p>The output format for diagnostic messages. Can be specified multiple times
and consists of comma-separated values. Valid values:</p>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
<p><code>human</code> (default): Display in a human-readable text format.</p> <p><code>human</code> (default): Display in a human-readable text format.</p>
</li> </li>
<li> <li>
<p><code>short</code>: Emit shorter, human-readable text messages.</p>
</li>
<li>
<p><code>json</code>: Emit JSON messages to stdout.</p> <p><code>json</code>: Emit JSON messages to stdout.</p>
</li> </li>
<li> <li>
<p><code>short</code>: Emit shorter, human-readable text messages.</p> <p><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains
the "short" rendering from rustc.</p>
</li>
<li>
<p><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages
contains embedded ANSI color codes for respecting rustc&#8217;s default color
scheme.</p>
</li>
<li>
<p><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo&#8217;s own JSON diagnostics and others
coming from rustc are still emitted.</p>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -235,17 +235,33 @@ terminal.</p>
</dd> </dd>
<dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt> <dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt>
<dd> <dd>
<p>The output format for diagnostic messages. Valid values:</p> <p>The output format for diagnostic messages. Can be specified multiple times
and consists of comma-separated values. Valid values:</p>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
<p><code>human</code> (default): Display in a human-readable text format.</p> <p><code>human</code> (default): Display in a human-readable text format.</p>
</li> </li>
<li> <li>
<p><code>short</code>: Emit shorter, human-readable text messages.</p>
</li>
<li>
<p><code>json</code>: Emit JSON messages to stdout.</p> <p><code>json</code>: Emit JSON messages to stdout.</p>
</li> </li>
<li> <li>
<p><code>short</code>: Emit shorter, human-readable text messages.</p> <p><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains
the "short" rendering from rustc.</p>
</li>
<li>
<p><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages
contains embedded ANSI color codes for respecting rustc&#8217;s default color
scheme.</p>
</li>
<li>
<p><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo&#8217;s own JSON diagnostics and others
coming from rustc are still emitted.</p>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -237,17 +237,33 @@ terminal.</p>
</dd> </dd>
<dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt> <dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt>
<dd> <dd>
<p>The output format for diagnostic messages. Valid values:</p> <p>The output format for diagnostic messages. Can be specified multiple times
and consists of comma-separated values. Valid values:</p>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
<p><code>human</code> (default): Display in a human-readable text format.</p> <p><code>human</code> (default): Display in a human-readable text format.</p>
</li> </li>
<li> <li>
<p><code>short</code>: Emit shorter, human-readable text messages.</p>
</li>
<li>
<p><code>json</code>: Emit JSON messages to stdout.</p> <p><code>json</code>: Emit JSON messages to stdout.</p>
</li> </li>
<li> <li>
<p><code>short</code>: Emit shorter, human-readable text messages.</p> <p><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains
the "short" rendering from rustc.</p>
</li>
<li>
<p><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages
contains embedded ANSI color codes for respecting rustc&#8217;s default color
scheme.</p>
</li>
<li>
<p><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo&#8217;s own JSON diagnostics and others
coming from rustc are still emitted.</p>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -205,17 +205,33 @@ terminal.</p>
</dd> </dd>
<dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt> <dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt>
<dd> <dd>
<p>The output format for diagnostic messages. Valid values:</p> <p>The output format for diagnostic messages. Can be specified multiple times
and consists of comma-separated values. Valid values:</p>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
<p><code>human</code> (default): Display in a human-readable text format.</p> <p><code>human</code> (default): Display in a human-readable text format.</p>
</li> </li>
<li> <li>
<p><code>short</code>: Emit shorter, human-readable text messages.</p>
</li>
<li>
<p><code>json</code>: Emit JSON messages to stdout.</p> <p><code>json</code>: Emit JSON messages to stdout.</p>
</li> </li>
<li> <li>
<p><code>short</code>: Emit shorter, human-readable text messages.</p> <p><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains
the "short" rendering from rustc.</p>
</li>
<li>
<p><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages
contains embedded ANSI color codes for respecting rustc&#8217;s default color
scheme.</p>
</li>
<li>
<p><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo&#8217;s own JSON diagnostics and others
coming from rustc are still emitted.</p>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -308,17 +308,33 @@ terminal.</p>
</dd> </dd>
<dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt> <dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt>
<dd> <dd>
<p>The output format for diagnostic messages. Valid values:</p> <p>The output format for diagnostic messages. Can be specified multiple times
and consists of comma-separated values. Valid values:</p>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
<p><code>human</code> (default): Display in a human-readable text format.</p> <p><code>human</code> (default): Display in a human-readable text format.</p>
</li> </li>
<li> <li>
<p><code>short</code>: Emit shorter, human-readable text messages.</p>
</li>
<li>
<p><code>json</code>: Emit JSON messages to stdout.</p> <p><code>json</code>: Emit JSON messages to stdout.</p>
</li> </li>
<li> <li>
<p><code>short</code>: Emit shorter, human-readable text messages.</p> <p><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains
the "short" rendering from rustc.</p>
</li>
<li>
<p><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages
contains embedded ANSI color codes for respecting rustc&#8217;s default color
scheme.</p>
</li>
<li>
<p><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo&#8217;s own JSON diagnostics and others
coming from rustc are still emitted.</p>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -35,7 +35,7 @@ for a Rust API for reading the metadata.</p>
</div> </div>
<div class="listingblock"> <div class="listingblock">
<div class="content"> <div class="content">
<pre class="highlightjs highlight"><code class="language-javascript hljs" data-lang="javascript">{ <pre class="highlightjs highlight"><code data-lang="javascript" class="language-javascript hljs">{
/* Array of all packages in the workspace. /* Array of all packages in the workspace.
It also includes all feature-enabled dependencies unless --no-deps is used. It also includes all feature-enabled dependencies unless --no-deps is used.
*/ */

View File

@ -168,17 +168,33 @@ terminal.</p>
</dd> </dd>
<dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt> <dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt>
<dd> <dd>
<p>The output format for diagnostic messages. Valid values:</p> <p>The output format for diagnostic messages. Can be specified multiple times
and consists of comma-separated values. Valid values:</p>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
<p><code>human</code> (default): Display in a human-readable text format.</p> <p><code>human</code> (default): Display in a human-readable text format.</p>
</li> </li>
<li> <li>
<p><code>short</code>: Emit shorter, human-readable text messages.</p>
</li>
<li>
<p><code>json</code>: Emit JSON messages to stdout.</p> <p><code>json</code>: Emit JSON messages to stdout.</p>
</li> </li>
<li> <li>
<p><code>short</code>: Emit shorter, human-readable text messages.</p> <p><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains
the "short" rendering from rustc.</p>
</li>
<li>
<p><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages
contains embedded ANSI color codes for respecting rustc&#8217;s default color
scheme.</p>
</li>
<li>
<p><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo&#8217;s own JSON diagnostics and others
coming from rustc are still emitted.</p>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -229,17 +229,33 @@ terminal.</p>
</dd> </dd>
<dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt> <dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt>
<dd> <dd>
<p>The output format for diagnostic messages. Valid values:</p> <p>The output format for diagnostic messages. Can be specified multiple times
and consists of comma-separated values. Valid values:</p>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
<p><code>human</code> (default): Display in a human-readable text format.</p> <p><code>human</code> (default): Display in a human-readable text format.</p>
</li> </li>
<li> <li>
<p><code>short</code>: Emit shorter, human-readable text messages.</p>
</li>
<li>
<p><code>json</code>: Emit JSON messages to stdout.</p> <p><code>json</code>: Emit JSON messages to stdout.</p>
</li> </li>
<li> <li>
<p><code>short</code>: Emit shorter, human-readable text messages.</p> <p><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains
the "short" rendering from rustc.</p>
</li>
<li>
<p><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages
contains embedded ANSI color codes for respecting rustc&#8217;s default color
scheme.</p>
</li>
<li>
<p><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo&#8217;s own JSON diagnostics and others
coming from rustc are still emitted.</p>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -242,17 +242,33 @@ terminal.</p>
</dd> </dd>
<dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt> <dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt>
<dd> <dd>
<p>The output format for diagnostic messages. Valid values:</p> <p>The output format for diagnostic messages. Can be specified multiple times
and consists of comma-separated values. Valid values:</p>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
<p><code>human</code> (default): Display in a human-readable text format.</p> <p><code>human</code> (default): Display in a human-readable text format.</p>
</li> </li>
<li> <li>
<p><code>short</code>: Emit shorter, human-readable text messages.</p>
</li>
<li>
<p><code>json</code>: Emit JSON messages to stdout.</p> <p><code>json</code>: Emit JSON messages to stdout.</p>
</li> </li>
<li> <li>
<p><code>short</code>: Emit shorter, human-readable text messages.</p> <p><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains
the "short" rendering from rustc.</p>
</li>
<li>
<p><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages
contains embedded ANSI color codes for respecting rustc&#8217;s default color
scheme.</p>
</li>
<li>
<p><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo&#8217;s own JSON diagnostics and others
coming from rustc are still emitted.</p>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -326,17 +326,33 @@ terminal.</p>
</dd> </dd>
<dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt> <dt class="hdlist1"><strong>--message-format</strong> <em>FMT</em></dt>
<dd> <dd>
<p>The output format for diagnostic messages. Valid values:</p> <p>The output format for diagnostic messages. Can be specified multiple times
and consists of comma-separated values. Valid values:</p>
<div class="ulist"> <div class="ulist">
<ul> <ul>
<li> <li>
<p><code>human</code> (default): Display in a human-readable text format.</p> <p><code>human</code> (default): Display in a human-readable text format.</p>
</li> </li>
<li> <li>
<p><code>short</code>: Emit shorter, human-readable text messages.</p>
</li>
<li>
<p><code>json</code>: Emit JSON messages to stdout.</p> <p><code>json</code>: Emit JSON messages to stdout.</p>
</li> </li>
<li> <li>
<p><code>short</code>: Emit shorter, human-readable text messages.</p> <p><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains
the "short" rendering from rustc.</p>
</li>
<li>
<p><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages
contains embedded ANSI color codes for respecting rustc&#8217;s default color
scheme.</p>
</li>
<li>
<p><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo&#8217;s own JSON diagnostics and others
coming from rustc are still emitted.</p>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -1,6 +1,16 @@
*--message-format* _FMT_:: *--message-format* _FMT_::
The output format for diagnostic messages. Valid values: The output format for diagnostic messages. Can be specified multiple times
and consists of comma-separated values. Valid values:
+ +
- `human` (default): Display in a human-readable text format. - `human` (default): Display in a human-readable text format.
- `json`: Emit JSON messages to stdout.
- `short`: Emit shorter, human-readable text messages. - `short`: Emit shorter, human-readable text messages.
- `json`: Emit JSON messages to stdout.
- `json-diagnostic-short`: Ensure the `rendered` field of JSON messages contains
the "short" rendering from rustc.
- `json-diagnostic-rendered-ansi`: Ensure the `rendered` field of JSON messages
contains embedded ANSI color codes for respecting rustc's default color
scheme.
- `json-render-diagnostics`: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo's own JSON diagnostics and others
coming from rustc are still emitted.

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-bench .\" Title: cargo-bench
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-05-08 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-BENCH" "1" "2019-05-08" "\ \&" "\ \&" .TH "CARGO\-BENCH" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0
@ -347,7 +347,8 @@ May also be specified with the \fBterm.color\fP
.sp .sp
\fB\-\-message\-format\fP \fIFMT\fP \fB\-\-message\-format\fP \fIFMT\fP
.RS 4 .RS 4
The output format for diagnostic messages. Valid values: The output format for diagnostic messages. Can be specified multiple times
and consists of comma\-separated values. Valid values:
.sp .sp
.RS 4 .RS 4
.ie n \{\ .ie n \{\
@ -368,6 +369,17 @@ The output format for diagnostic messages. Valid values:
. sp -1 . sp -1
. IP \(bu 2.3 . IP \(bu 2.3
.\} .\}
\fBshort\fP: Emit shorter, human\-readable text messages.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\fP: Emit JSON messages to stdout. \fBjson\fP: Emit JSON messages to stdout.
.RE .RE
.sp .sp
@ -379,7 +391,35 @@ The output format for diagnostic messages. Valid values:
. sp -1 . sp -1
. IP \(bu 2.3 . IP \(bu 2.3
.\} .\}
\fBshort\fP: Emit shorter, human\-readable text messages. \fBjson\-diagnostic\-short\fP: Ensure the \fBrendered\fP field of JSON messages contains
the "short" rendering from rustc.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\-diagnostic\-rendered\-ansi\fP: Ensure the \fBrendered\fP field of JSON messages
contains embedded ANSI color codes for respecting rustc\(cqs default color
scheme.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\-render\-diagnostics\fP: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo\(cqs own JSON diagnostics and others
coming from rustc are still emitted.
.RE .RE
.RE .RE
.SS "Manifest Options" .SS "Manifest Options"

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-build .\" Title: cargo-build
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-05-08 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-BUILD" "1" "2019-05-08" "\ \&" "\ \&" .TH "CARGO\-BUILD" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0
@ -256,7 +256,8 @@ May also be specified with the \fBterm.color\fP
.sp .sp
\fB\-\-message\-format\fP \fIFMT\fP \fB\-\-message\-format\fP \fIFMT\fP
.RS 4 .RS 4
The output format for diagnostic messages. Valid values: The output format for diagnostic messages. Can be specified multiple times
and consists of comma\-separated values. Valid values:
.sp .sp
.RS 4 .RS 4
.ie n \{\ .ie n \{\
@ -277,6 +278,17 @@ The output format for diagnostic messages. Valid values:
. sp -1 . sp -1
. IP \(bu 2.3 . IP \(bu 2.3
.\} .\}
\fBshort\fP: Emit shorter, human\-readable text messages.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\fP: Emit JSON messages to stdout. \fBjson\fP: Emit JSON messages to stdout.
.RE .RE
.sp .sp
@ -288,7 +300,35 @@ The output format for diagnostic messages. Valid values:
. sp -1 . sp -1
. IP \(bu 2.3 . IP \(bu 2.3
.\} .\}
\fBshort\fP: Emit shorter, human\-readable text messages. \fBjson\-diagnostic\-short\fP: Ensure the \fBrendered\fP field of JSON messages contains
the "short" rendering from rustc.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\-diagnostic\-rendered\-ansi\fP: Ensure the \fBrendered\fP field of JSON messages
contains embedded ANSI color codes for respecting rustc\(cqs default color
scheme.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\-render\-diagnostics\fP: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo\(cqs own JSON diagnostics and others
coming from rustc are still emitted.
.RE .RE
.RE .RE
.sp .sp

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-check .\" Title: cargo-check
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-04-16 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-CHECK" "1" "2019-04-16" "\ \&" "\ \&" .TH "CARGO\-CHECK" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0
@ -256,7 +256,8 @@ May also be specified with the \fBterm.color\fP
.sp .sp
\fB\-\-message\-format\fP \fIFMT\fP \fB\-\-message\-format\fP \fIFMT\fP
.RS 4 .RS 4
The output format for diagnostic messages. Valid values: The output format for diagnostic messages. Can be specified multiple times
and consists of comma\-separated values. Valid values:
.sp .sp
.RS 4 .RS 4
.ie n \{\ .ie n \{\
@ -277,6 +278,17 @@ The output format for diagnostic messages. Valid values:
. sp -1 . sp -1
. IP \(bu 2.3 . IP \(bu 2.3
.\} .\}
\fBshort\fP: Emit shorter, human\-readable text messages.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\fP: Emit JSON messages to stdout. \fBjson\fP: Emit JSON messages to stdout.
.RE .RE
.sp .sp
@ -288,7 +300,35 @@ The output format for diagnostic messages. Valid values:
. sp -1 . sp -1
. IP \(bu 2.3 . IP \(bu 2.3
.\} .\}
\fBshort\fP: Emit shorter, human\-readable text messages. \fBjson\-diagnostic\-short\fP: Ensure the \fBrendered\fP field of JSON messages contains
the "short" rendering from rustc.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\-diagnostic\-rendered\-ansi\fP: Ensure the \fBrendered\fP field of JSON messages
contains embedded ANSI color codes for respecting rustc\(cqs default color
scheme.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\-render\-diagnostics\fP: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo\(cqs own JSON diagnostics and others
coming from rustc are still emitted.
.RE .RE
.RE .RE
.SS "Manifest Options" .SS "Manifest Options"

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-clean .\" Title: cargo-clean
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-04-16 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-CLEAN" "1" "2019-04-16" "\ \&" "\ \&" .TH "CARGO\-CLEAN" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-doc .\" Title: cargo-doc
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-04-16 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-DOC" "1" "2019-04-16" "\ \&" "\ \&" .TH "CARGO\-DOC" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0
@ -213,7 +213,8 @@ May also be specified with the \fBterm.color\fP
.sp .sp
\fB\-\-message\-format\fP \fIFMT\fP \fB\-\-message\-format\fP \fIFMT\fP
.RS 4 .RS 4
The output format for diagnostic messages. Valid values: The output format for diagnostic messages. Can be specified multiple times
and consists of comma\-separated values. Valid values:
.sp .sp
.RS 4 .RS 4
.ie n \{\ .ie n \{\
@ -234,6 +235,17 @@ The output format for diagnostic messages. Valid values:
. sp -1 . sp -1
. IP \(bu 2.3 . IP \(bu 2.3
.\} .\}
\fBshort\fP: Emit shorter, human\-readable text messages.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\fP: Emit JSON messages to stdout. \fBjson\fP: Emit JSON messages to stdout.
.RE .RE
.sp .sp
@ -245,7 +257,35 @@ The output format for diagnostic messages. Valid values:
. sp -1 . sp -1
. IP \(bu 2.3 . IP \(bu 2.3
.\} .\}
\fBshort\fP: Emit shorter, human\-readable text messages. \fBjson\-diagnostic\-short\fP: Ensure the \fBrendered\fP field of JSON messages contains
the "short" rendering from rustc.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\-diagnostic\-rendered\-ansi\fP: Ensure the \fBrendered\fP field of JSON messages
contains embedded ANSI color codes for respecting rustc\(cqs default color
scheme.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\-render\-diagnostics\fP: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo\(cqs own JSON diagnostics and others
coming from rustc are still emitted.
.RE .RE
.RE .RE
.SS "Manifest Options" .SS "Manifest Options"

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-fetch .\" Title: cargo-fetch
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-05-12 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-FETCH" "1" "2019-05-12" "\ \&" "\ \&" .TH "CARGO\-FETCH" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-fix .\" Title: cargo-fix
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-04-16 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-FIX" "1" "2019-04-16" "\ \&" "\ \&" .TH "CARGO\-FIX" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0
@ -326,7 +326,8 @@ May also be specified with the \fBterm.color\fP
.sp .sp
\fB\-\-message\-format\fP \fIFMT\fP \fB\-\-message\-format\fP \fIFMT\fP
.RS 4 .RS 4
The output format for diagnostic messages. Valid values: The output format for diagnostic messages. Can be specified multiple times
and consists of comma\-separated values. Valid values:
.sp .sp
.RS 4 .RS 4
.ie n \{\ .ie n \{\
@ -347,6 +348,17 @@ The output format for diagnostic messages. Valid values:
. sp -1 . sp -1
. IP \(bu 2.3 . IP \(bu 2.3
.\} .\}
\fBshort\fP: Emit shorter, human\-readable text messages.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\fP: Emit JSON messages to stdout. \fBjson\fP: Emit JSON messages to stdout.
.RE .RE
.sp .sp
@ -358,7 +370,35 @@ The output format for diagnostic messages. Valid values:
. sp -1 . sp -1
. IP \(bu 2.3 . IP \(bu 2.3
.\} .\}
\fBshort\fP: Emit shorter, human\-readable text messages. \fBjson\-diagnostic\-short\fP: Ensure the \fBrendered\fP field of JSON messages contains
the "short" rendering from rustc.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\-diagnostic\-rendered\-ansi\fP: Ensure the \fBrendered\fP field of JSON messages
contains embedded ANSI color codes for respecting rustc\(cqs default color
scheme.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\-render\-diagnostics\fP: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo\(cqs own JSON diagnostics and others
coming from rustc are still emitted.
.RE .RE
.RE .RE
.SS "Manifest Options" .SS "Manifest Options"

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-generate-lockfile .\" Title: cargo-generate-lockfile
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-04-16 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-GENERATE\-LOCKFILE" "1" "2019-04-16" "\ \&" "\ \&" .TH "CARGO\-GENERATE\-LOCKFILE" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-help .\" Title: cargo-help
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2018-12-20 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-HELP" "1" "2018-12-20" "\ \&" "\ \&" .TH "CARGO\-HELP" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-init .\" Title: cargo-init
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-01-23 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-INIT" "1" "2019-01-23" "\ \&" "\ \&" .TH "CARGO\-INIT" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-install .\" Title: cargo-install
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-06-10 .\" Date: 2019-07-15
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-INSTALL" "1" "2019-06-10" "\ \&" "\ \&" .TH "CARGO\-INSTALL" "1" "2019-07-15" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-locate-project .\" Title: cargo-locate-project
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2018-12-20 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-LOCATE\-PROJECT" "1" "2018-12-20" "\ \&" "\ \&" .TH "CARGO\-LOCATE\-PROJECT" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-login .\" Title: cargo-login
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-01-23 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-LOGIN" "1" "2019-01-23" "\ \&" "\ \&" .TH "CARGO\-LOGIN" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-metadata .\" Title: cargo-metadata
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-05-20 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-METADATA" "1" "2019-05-20" "\ \&" "\ \&" .TH "CARGO\-METADATA" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-new .\" Title: cargo-new
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-01-23 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-NEW" "1" "2019-01-23" "\ \&" "\ \&" .TH "CARGO\-NEW" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-owner .\" Title: cargo-owner
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-02-05 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-OWNER" "1" "2019-02-05" "\ \&" "\ \&" .TH "CARGO\-OWNER" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-package .\" Title: cargo-package
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-06-10 .\" Date: 2019-07-15
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-PACKAGE" "1" "2019-06-10" "\ \&" "\ \&" .TH "CARGO\-PACKAGE" "1" "2019-07-15" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-pkgid .\" Title: cargo-pkgid
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-04-16 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-PKGID" "1" "2019-04-16" "\ \&" "\ \&" .TH "CARGO\-PKGID" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-publish .\" Title: cargo-publish
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-05-08 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-PUBLISH" "1" "2019-05-08" "\ \&" "\ \&" .TH "CARGO\-PUBLISH" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-run .\" Title: cargo-run
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-06-21 .\" Date: 2019-07-15
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-RUN" "1" "2019-06-21" "\ \&" "\ \&" .TH "CARGO\-RUN" "1" "2019-07-15" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0
@ -176,7 +176,8 @@ May also be specified with the \fBterm.color\fP
.sp .sp
\fB\-\-message\-format\fP \fIFMT\fP \fB\-\-message\-format\fP \fIFMT\fP
.RS 4 .RS 4
The output format for diagnostic messages. Valid values: The output format for diagnostic messages. Can be specified multiple times
and consists of comma\-separated values. Valid values:
.sp .sp
.RS 4 .RS 4
.ie n \{\ .ie n \{\
@ -197,6 +198,17 @@ The output format for diagnostic messages. Valid values:
. sp -1 . sp -1
. IP \(bu 2.3 . IP \(bu 2.3
.\} .\}
\fBshort\fP: Emit shorter, human\-readable text messages.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\fP: Emit JSON messages to stdout. \fBjson\fP: Emit JSON messages to stdout.
.RE .RE
.sp .sp
@ -208,7 +220,35 @@ The output format for diagnostic messages. Valid values:
. sp -1 . sp -1
. IP \(bu 2.3 . IP \(bu 2.3
.\} .\}
\fBshort\fP: Emit shorter, human\-readable text messages. \fBjson\-diagnostic\-short\fP: Ensure the \fBrendered\fP field of JSON messages contains
the "short" rendering from rustc.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\-diagnostic\-rendered\-ansi\fP: Ensure the \fBrendered\fP field of JSON messages
contains embedded ANSI color codes for respecting rustc\(cqs default color
scheme.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\-render\-diagnostics\fP: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo\(cqs own JSON diagnostics and others
coming from rustc are still emitted.
.RE .RE
.RE .RE
.SS "Manifest Options" .SS "Manifest Options"

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-rustc .\" Title: cargo-rustc
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-04-16 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-RUSTC" "1" "2019-04-16" "\ \&" "\ \&" .TH "CARGO\-RUSTC" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0
@ -245,7 +245,8 @@ May also be specified with the \fBterm.color\fP
.sp .sp
\fB\-\-message\-format\fP \fIFMT\fP \fB\-\-message\-format\fP \fIFMT\fP
.RS 4 .RS 4
The output format for diagnostic messages. Valid values: The output format for diagnostic messages. Can be specified multiple times
and consists of comma\-separated values. Valid values:
.sp .sp
.RS 4 .RS 4
.ie n \{\ .ie n \{\
@ -266,6 +267,17 @@ The output format for diagnostic messages. Valid values:
. sp -1 . sp -1
. IP \(bu 2.3 . IP \(bu 2.3
.\} .\}
\fBshort\fP: Emit shorter, human\-readable text messages.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\fP: Emit JSON messages to stdout. \fBjson\fP: Emit JSON messages to stdout.
.RE .RE
.sp .sp
@ -277,7 +289,35 @@ The output format for diagnostic messages. Valid values:
. sp -1 . sp -1
. IP \(bu 2.3 . IP \(bu 2.3
.\} .\}
\fBshort\fP: Emit shorter, human\-readable text messages. \fBjson\-diagnostic\-short\fP: Ensure the \fBrendered\fP field of JSON messages contains
the "short" rendering from rustc.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\-diagnostic\-rendered\-ansi\fP: Ensure the \fBrendered\fP field of JSON messages
contains embedded ANSI color codes for respecting rustc\(cqs default color
scheme.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\-render\-diagnostics\fP: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo\(cqs own JSON diagnostics and others
coming from rustc are still emitted.
.RE .RE
.RE .RE
.SS "Manifest Options" .SS "Manifest Options"

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-rustdoc .\" Title: cargo-rustdoc
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-04-16 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-RUSTDOC" "1" "2019-04-16" "\ \&" "\ \&" .TH "CARGO\-RUSTDOC" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0
@ -253,7 +253,8 @@ May also be specified with the \fBterm.color\fP
.sp .sp
\fB\-\-message\-format\fP \fIFMT\fP \fB\-\-message\-format\fP \fIFMT\fP
.RS 4 .RS 4
The output format for diagnostic messages. Valid values: The output format for diagnostic messages. Can be specified multiple times
and consists of comma\-separated values. Valid values:
.sp .sp
.RS 4 .RS 4
.ie n \{\ .ie n \{\
@ -274,6 +275,17 @@ The output format for diagnostic messages. Valid values:
. sp -1 . sp -1
. IP \(bu 2.3 . IP \(bu 2.3
.\} .\}
\fBshort\fP: Emit shorter, human\-readable text messages.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\fP: Emit JSON messages to stdout. \fBjson\fP: Emit JSON messages to stdout.
.RE .RE
.sp .sp
@ -285,7 +297,35 @@ The output format for diagnostic messages. Valid values:
. sp -1 . sp -1
. IP \(bu 2.3 . IP \(bu 2.3
.\} .\}
\fBshort\fP: Emit shorter, human\-readable text messages. \fBjson\-diagnostic\-short\fP: Ensure the \fBrendered\fP field of JSON messages contains
the "short" rendering from rustc.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\-diagnostic\-rendered\-ansi\fP: Ensure the \fBrendered\fP field of JSON messages
contains embedded ANSI color codes for respecting rustc\(cqs default color
scheme.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\-render\-diagnostics\fP: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo\(cqs own JSON diagnostics and others
coming from rustc are still emitted.
.RE .RE
.RE .RE
.SS "Manifest Options" .SS "Manifest Options"

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-search .\" Title: cargo-search
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-01-23 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-SEARCH" "1" "2019-01-23" "\ \&" "\ \&" .TH "CARGO\-SEARCH" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-test .\" Title: cargo-test
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-05-08 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-TEST" "1" "2019-05-08" "\ \&" "\ \&" .TH "CARGO\-TEST" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0
@ -389,7 +389,8 @@ May also be specified with the \fBterm.color\fP
.sp .sp
\fB\-\-message\-format\fP \fIFMT\fP \fB\-\-message\-format\fP \fIFMT\fP
.RS 4 .RS 4
The output format for diagnostic messages. Valid values: The output format for diagnostic messages. Can be specified multiple times
and consists of comma\-separated values. Valid values:
.sp .sp
.RS 4 .RS 4
.ie n \{\ .ie n \{\
@ -410,6 +411,17 @@ The output format for diagnostic messages. Valid values:
. sp -1 . sp -1
. IP \(bu 2.3 . IP \(bu 2.3
.\} .\}
\fBshort\fP: Emit shorter, human\-readable text messages.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\fP: Emit JSON messages to stdout. \fBjson\fP: Emit JSON messages to stdout.
.RE .RE
.sp .sp
@ -421,7 +433,35 @@ The output format for diagnostic messages. Valid values:
. sp -1 . sp -1
. IP \(bu 2.3 . IP \(bu 2.3
.\} .\}
\fBshort\fP: Emit shorter, human\-readable text messages. \fBjson\-diagnostic\-short\fP: Ensure the \fBrendered\fP field of JSON messages contains
the "short" rendering from rustc.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\-diagnostic\-rendered\-ansi\fP: Ensure the \fBrendered\fP field of JSON messages
contains embedded ANSI color codes for respecting rustc\(cqs default color
scheme.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
\fBjson\-render\-diagnostics\fP: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo\(cqs own JSON diagnostics and others
coming from rustc are still emitted.
.RE .RE
.RE .RE
.SS "Manifest Options" .SS "Manifest Options"

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-uninstall .\" Title: cargo-uninstall
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2018-12-20 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-UNINSTALL" "1" "2018-12-20" "\ \&" "\ \&" .TH "CARGO\-UNINSTALL" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-update .\" Title: cargo-update
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-04-16 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-UPDATE" "1" "2019-04-16" "\ \&" "\ \&" .TH "CARGO\-UPDATE" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -2,12 +2,12 @@
.\" Title: cargo-vendor .\" Title: cargo-vendor
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 2.0.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-04-29 .\" Date: 2019-07-15
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-VENDOR" "1" "2019-04-29" "\ \&" "\ \&" .TH "CARGO\-VENDOR" "1" "2019-07-15" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0
@ -149,6 +149,23 @@ These may be used in environments where you want to assert that the
\fBCargo.lock\fP file is up\-to\-date (such as a CI build) or want to avoid network \fBCargo.lock\fP file is up\-to\-date (such as a CI build) or want to avoid network
access. access.
.RE .RE
.sp
\fB\-\-offline\fP
.RS 4
Prevents Cargo from accessing the network for any reason. Without this
flag, Cargo will stop with an error if it needs to access the network and
the network is not available. With this flag, Cargo will attempt to
proceed without the network if possible.
.sp
Beware that this may result in different dependency resolution than online
mode. Cargo will restrict itself to crates that are downloaded locally, even
if there might be a newer version as indicated in the local copy of the index.
See the \fBcargo\-fetch\fP(1) command to download dependencies before going
offline.
.sp
May also be specified with the \fBnet.offline\fP \c
.URL "https://doc.rust\-lang.org/cargo/reference/config.html" "config value" "."
.RE
.SH "ENVIRONMENT" .SH "ENVIRONMENT"
.sp .sp
See \c See \c

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-verify-project .\" Title: cargo-verify-project
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-04-16 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-VERIFY\-PROJECT" "1" "2019-04-16" "\ \&" "\ \&" .TH "CARGO\-VERIFY\-PROJECT" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-version .\" Title: cargo-version
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2018-12-20 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-VERSION" "1" "2018-12-20" "\ \&" "\ \&" .TH "CARGO\-VERSION" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo-yank .\" Title: cargo-yank
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-01-23 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO\-YANK" "1" "2019-01-23" "\ \&" "\ \&" .TH "CARGO\-YANK" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -1,13 +1,13 @@
'\" t '\" t
.\" Title: cargo .\" Title: cargo
.\" Author: [see the "AUTHOR(S)" section] .\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 1.5.8 .\" Generator: Asciidoctor 2.0.8
.\" Date: 2019-05-20 .\" Date: 2019-06-07
.\" Manual: \ \& .\" Manual: \ \&
.\" Source: \ \& .\" Source: \ \&
.\" Language: English .\" Language: English
.\" .\"
.TH "CARGO" "1" "2019-05-20" "\ \&" "\ \&" .TH "CARGO" "1" "2019-06-07" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq .ie \n(.g .ds Aq \(aq
.el .ds Aq ' .el .ds Aq '
.ss \n[.ss] 0 .ss \n[.ss] 0

View File

@ -3264,11 +3264,10 @@ fn wrong_message_format_option() {
.build(); .build();
p.cargo("build --message-format XML") p.cargo("build --message-format XML")
.with_status(1) .with_status(101)
.with_stderr_contains( .with_stderr_contains(
"\ "\
error: 'XML' isn't a valid value for '--message-format <FMT>' error: invalid message format specifier: `xml`
<tab>[possible values: human, json, short]
", ",
) )
.run(); .run();

View File

@ -937,7 +937,7 @@ fn both_edition_migrate_flags() {
error: The argument '--edition' cannot be used with '--prepare-for <prepare-for>' error: The argument '--edition' cannot be used with '--prepare-for <prepare-for>'
USAGE: USAGE:
cargo[..] fix --edition --message-format <FMT> cargo[..] fix --edition
For more information try --help For more information try --help
"; ";

View File

@ -57,6 +57,7 @@ mod local_registry;
mod lockfile_compat; mod lockfile_compat;
mod login; mod login;
mod member_errors; mod member_errors;
mod message_format;
mod metabuild; mod metabuild;
mod metadata; mod metadata;
mod net_config; mod net_config;

View File

@ -0,0 +1,126 @@
use crate::support::{basic_manifest, project};
#[cargo_test]
fn cannot_specify_two() {
if !crate::support::is_nightly() {
return;
}
let p = project()
.file("Cargo.toml", &basic_manifest("foo", "0.1.0"))
.file("src/main.rs", "fn main() {}")
.build();
let formats = ["human", "json", "short"];
let two_kinds = "error: cannot specify two kinds of `message-format` arguments\n";
for a in formats.iter() {
for b in formats.iter() {
p.cargo(&format!("build --message-format {},{}", a, b))
.with_status(101)
.with_stderr(two_kinds)
.run();
}
}
}
#[cargo_test]
fn double_json_works() {
if !crate::support::is_nightly() {
return;
}
let p = project()
.file("Cargo.toml", &basic_manifest("foo", "0.1.0"))
.file("src/main.rs", "fn main() {}")
.build();
p.cargo("build --message-format json,json-render-diagnostics")
.run();
p.cargo("build --message-format json,json-diagnostic-short")
.run();
p.cargo("build --message-format json,json-diagnostic-rendered-ansi")
.run();
p.cargo("build --message-format json --message-format json-diagnostic-rendered-ansi")
.run();
p.cargo("build --message-format json-diagnostic-rendered-ansi")
.run();
p.cargo("build --message-format json-diagnostic-short,json-diagnostic-rendered-ansi")
.run();
}
#[cargo_test]
fn cargo_renders() {
if !crate::support::is_nightly() {
return;
}
let p = project()
.file(
"Cargo.toml",
r#"
[package]
name = 'foo'
version = '0.1.0'
[dependencies]
bar = { path = 'bar' }
"#,
)
.file("src/main.rs", "")
.file("bar/Cargo.toml", &basic_manifest("bar", "0.1.0"))
.file("bar/src/lib.rs", "")
.build();
p.cargo("build --message-format json-render-diagnostics")
.with_status(101)
.with_stdout("{\"reason\":\"compiler-artifact\",[..]")
.with_stderr_contains(
"\
[COMPILING] bar [..]
[COMPILING] foo [..]
error[..]`main`[..]
",
)
.run();
}
#[cargo_test]
fn cargo_renders_short() {
if !crate::support::is_nightly() {
return;
}
let p = project()
.file("Cargo.toml", &basic_manifest("foo", "0.1.0"))
.file("src/main.rs", "")
.build();
p.cargo("build --message-format json-render-diagnostics,json-diagnostic-short")
.with_status(101)
.with_stderr_contains(
"\
[COMPILING] foo [..]
error[..]`main`[..]
",
)
.with_stderr_does_not_contain("note:")
.run();
}
#[cargo_test]
fn cargo_renders_ansi() {
if !crate::support::is_nightly() {
return;
}
let p = project()
.file("Cargo.toml", &basic_manifest("foo", "0.1.0"))
.file("src/main.rs", "")
.build();
p.cargo("build --message-format json-diagnostic-rendered-ansi")
.with_status(101)
.with_stdout_contains("[..]\\u001b[38;5;9merror[..]")
.run();
}