Skip to content

Commit

Permalink
Auto merge of #7927 - ehuss:metadata-docs-clarify, r=alexcrichton
Browse files Browse the repository at this point in the history
Try to clarify `cargo metadata`'s relationship with the workspace.

Closes #7893
  • Loading branch information
bors committed Feb 26, 2020
2 parents c07634e + 3099685 commit ab2b2c0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub fn cli() -> App {
)
.arg(opt(
"no-deps",
"Output information only about the root package \
"Output information only about the workspace members \
and don't fetch dependencies",
))
.arg_manifest_path()
Expand Down
9 changes: 5 additions & 4 deletions src/doc/man/cargo-metadata.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ cargo-metadata - Machine-readable metadata about the current package

== DESCRIPTION

Output the resolved dependencies of a package, the concrete used versions
including overrides, in JSON to stdout.
Output JSON to stdout containing information about the workspace members and
resolved dependencies of the current package.

It is recommended to include the `--format-version` flag to future-proof
your code to ensure the output is in the format you are expecting.
Expand Down Expand Up @@ -199,8 +199,9 @@ The output has the following format:
"workspace_members": [
"my-package 0.1.0 (path+file:///path/to/my-package)",
],
// The resolved dependency graph, with the concrete versions and features
// selected. The set depends on the enabled features.
// The resolved dependency graph for the entire workspace. The enabled
// features are based on the enabled features for the "current" package.
// Inactivated optional dependencies are not listed.
//
// This is null if --no-deps is specified.
//
Expand Down
9 changes: 5 additions & 4 deletions src/doc/man/generated/cargo-metadata.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ <h2 id="cargo_metadata_synopsis">SYNOPSIS</h2>
<h2 id="cargo_metadata_description">DESCRIPTION</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Output the resolved dependencies of a package, the concrete used versions
including overrides, in JSON to stdout.</p>
<p>Output JSON to stdout containing information about the workspace members and
resolved dependencies of the current package.</p>
</div>
<div class="paragraph">
<p>It is recommended to include the <code>--format-version</code> flag to future-proof
Expand Down Expand Up @@ -206,8 +206,9 @@ <h2 id="cargo_metadata_output_format">OUTPUT FORMAT</h2>
"workspace_members": [
"my-package 0.1.0 (path+file:///path/to/my-package)",
],
// The resolved dependency graph, with the concrete versions and features
// selected. The set depends on the enabled features.
// The resolved dependency graph for the entire workspace. The enabled
// features are based on the enabled features for the "current" package.
// Inactivated optional dependencies are not listed.
//
// This is null if --no-deps is specified.
//
Expand Down
9 changes: 5 additions & 4 deletions src/etc/man/cargo-metadata.1
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ cargo\-metadata \- Machine\-readable metadata about the current package
\fBcargo metadata [\fIOPTIONS\fP]\fP
.SH "DESCRIPTION"
.sp
Output the resolved dependencies of a package, the concrete used versions
including overrides, in JSON to stdout.
Output JSON to stdout containing information about the workspace members and
resolved dependencies of the current package.
.sp
It is recommended to include the \fB\-\-format\-version\fP flag to future\-proof
your code to ensure the output is in the format you are expecting.
Expand Down Expand Up @@ -220,8 +220,9 @@ The output has the following format:
"workspace_members": [
"my\-package 0.1.0 (path+file:///path/to/my\-package)",
],
// The resolved dependency graph, with the concrete versions and features
// selected. The set depends on the enabled features.
// The resolved dependency graph for the entire workspace. The enabled
// features are based on the enabled features for the "current" package.
// Inactivated optional dependencies are not listed.
//
// This is null if \-\-no\-deps is specified.
//
Expand Down

0 comments on commit ab2b2c0

Please sign in to comment.