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

Try to clarify cargo metadata's relationship with the workspace. #7927

Merged
merged 1 commit into from
Feb 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
13 changes: 7 additions & 6 deletions src/etc/man/cargo-metadata.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.\" Title: cargo-metadata
.\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 2.0.10
.\" Date: 2019-12-05
.\" Date: 2020-02-24
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "CARGO\-METADATA" "1" "2019-12-05" "\ \&" "\ \&"
.TH "CARGO\-METADATA" "1" "2020-02-24" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.ss \n[.ss] 0
Expand All @@ -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