Skip to content

Commit ad1a3b3

Browse files
committed
docs: more links to JSON messages
1 parent b5457ac commit ad1a3b3

File tree

8 files changed

+43
-22
lines changed

8 files changed

+43
-22
lines changed

src/doc/man/cargo-metadata.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,6 @@ The JSON output has the following format:
334334
Notes:
335335
- For `"id"` field syntax, see [Package ID Specifications] in the reference.
336336

337-
[Package ID Specifications]: ../reference/pkgid-spec.html
338-
339337
## OPTIONS
340338

341339
### Output Options
@@ -393,6 +391,8 @@ reproduction of the information within `Cargo.toml`.
393391
cargo metadata --format-version=1
394392
395393
## SEE ALSO
396-
{{man "cargo" 1}}, {{man "cargo-pkgid" 1}}, [Package ID Specifications]
394+
395+
{{man "cargo" 1}}, {{man "cargo-pkgid" 1}}, [Package ID Specifications], [JSON messages]
397396
398397
[Package ID Specifications]: ../reference/pkgid-spec.html
398+
[JSON messages]: ../reference/external-tools.html#json-messages

src/doc/man/cargo-pkgid.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ fetched.
2121

2222
A package specifier consists of a name, version, and source URL. You are
2323
allowed to use partial specifiers to succinctly match a specific package as
24-
long as it matches only one package. The format of a _spec_ can be one of the
25-
following:
24+
long as it matches only one package. This specifier is also used by other parts
25+
in Cargo, such as {{man "cargo-metadata" 1}} and [JSON messages] emitted by Cargo.
26+
27+
The format of a _spec_ can be one of the following:
2628

2729
SPEC Structure | Example SPEC
2830
---------------------------|--------------
@@ -88,6 +90,9 @@ Get the package ID for the given package instead of the current package.
8890
cargo pkgid file:///path/to/local/package#foo
8991

9092
## SEE ALSO
91-
{{man "cargo" 1}}, {{man "cargo-generate-lockfile" 1}}, {{man "cargo-metadata" 1}}, [Package ID Specifications]
93+
94+
{{man "cargo" 1}}, {{man "cargo-generate-lockfile" 1}}, {{man "cargo-metadata" 1}},
95+
[Package ID Specifications], [JSON messages]
9296

9397
[Package ID Specifications]: ../reference/pkgid-spec.html
98+
[JSON messages]: ../reference/external-tools.html#json-messages

src/doc/man/generated_txt/cargo-metadata.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -483,5 +483,7 @@ EXAMPLES
483483

484484
SEE ALSO
485485
cargo(1), cargo-pkgid(1), Package ID Specifications
486-
<https://doc.rust-lang.org/cargo/reference/pkgid-spec.html>
486+
<https://doc.rust-lang.org/cargo/reference/pkgid-spec.html>, JSON
487+
messages
488+
<https://doc.rust-lang.org/cargo/reference/external-tools.html#json-messages>
487489

src/doc/man/generated_txt/cargo-pkgid.txt

+9-3
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@ DESCRIPTION
1818

1919
A package specifier consists of a name, version, and source URL. You are
2020
allowed to use partial specifiers to succinctly match a specific package
21-
as long as it matches only one package. The format of a spec can be one
22-
of the following:
21+
as long as it matches only one package. This specifier is also used by
22+
other parts in Cargo, such as cargo-metadata(1) and JSON messages
23+
<https://doc.rust-lang.org/cargo/reference/external-tools.html#json-messages>
24+
emitted by Cargo.
25+
26+
The format of a spec can be one of the following:
2327

2428
+-----------------+--------------------------------------------------+
2529
| SPEC Structure | Example SPEC |
@@ -172,5 +176,7 @@ EXAMPLES
172176
SEE ALSO
173177
cargo(1), cargo-generate-lockfile(1), cargo-metadata(1), Package ID
174178
Specifications
175-
<https://doc.rust-lang.org/cargo/reference/pkgid-spec.html>
179+
<https://doc.rust-lang.org/cargo/reference/pkgid-spec.html>, JSON
180+
messages
181+
<https://doc.rust-lang.org/cargo/reference/external-tools.html#json-messages>
176182

src/doc/src/commands/cargo-metadata.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,6 @@ The JSON output has the following format:
334334
Notes:
335335
- For `"id"` field syntax, see [Package ID Specifications] in the reference.
336336

337-
[Package ID Specifications]: ../reference/pkgid-spec.html
338-
339337
## OPTIONS
340338

341339
### Output Options
@@ -512,6 +510,8 @@ details on environment variables that Cargo reads.
512510
cargo metadata --format-version=1
513511

514512
## SEE ALSO
515-
[cargo(1)](cargo.html), [cargo-pkgid(1)](cargo-pkgid.html), [Package ID Specifications]
513+
514+
[cargo(1)](cargo.html), [cargo-pkgid(1)](cargo-pkgid.html), [Package ID Specifications], [JSON messages]
516515

517516
[Package ID Specifications]: ../reference/pkgid-spec.html
517+
[JSON messages]: ../reference/external-tools.html#json-messages

src/doc/src/commands/cargo-pkgid.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ fetched.
2121

2222
A package specifier consists of a name, version, and source URL. You are
2323
allowed to use partial specifiers to succinctly match a specific package as
24-
long as it matches only one package. The format of a _spec_ can be one of the
25-
following:
24+
long as it matches only one package. This specifier is also used by other parts
25+
in Cargo, such as [cargo-metadata(1)](cargo-metadata.html) and [JSON messages] emitted by Cargo.
26+
27+
The format of a _spec_ can be one of the following:
2628

2729
SPEC Structure | Example SPEC
2830
---------------------------|--------------
@@ -183,6 +185,9 @@ details on environment variables that Cargo reads.
183185
cargo pkgid file:///path/to/local/package#foo
184186

185187
## SEE ALSO
186-
[cargo(1)](cargo.html), [cargo-generate-lockfile(1)](cargo-generate-lockfile.html), [cargo-metadata(1)](cargo-metadata.html), [Package ID Specifications]
188+
189+
[cargo(1)](cargo.html), [cargo-generate-lockfile(1)](cargo-generate-lockfile.html), [cargo-metadata(1)](cargo-metadata.html),
190+
[Package ID Specifications], [JSON messages]
187191

188192
[Package ID Specifications]: ../reference/pkgid-spec.html
193+
[JSON messages]: ../reference/external-tools.html#json-messages

src/etc/man/cargo-metadata.1

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ The JSON output has the following format:
5555
"name": "my\-package",
5656
/* The version of the package. */
5757
"version": "0.1.0",
58-
/* The Package ID, an opaque and unique identifier for referring to the
59-
package. See "Compatibility" above for the stability guarantee.
58+
/* The Package ID for referring to the
59+
package within the document and as the `\-\-package` argument to many commands
6060
*/
6161
"id": "file:///path/to/my\-package#0.1.0",
6262
/* The license value from the manifest, or null. */
@@ -529,4 +529,4 @@ cargo metadata \-\-format\-version=1
529529
.RE
530530
.RE
531531
.SH "SEE ALSO"
532-
\fBcargo\fR(1), \fBcargo\-pkgid\fR(1), \fIPackage ID Specifications\fR <https://doc.rust\-lang.org/cargo/reference/pkgid\-spec.html>
532+
\fBcargo\fR(1), \fBcargo\-pkgid\fR(1), \fIPackage ID Specifications\fR <https://doc.rust\-lang.org/cargo/reference/pkgid\-spec.html>, \fIJSON messages\fR <https://doc.rust\-lang.org/cargo/reference/external\-tools.html#json\-messages>

src/etc/man/cargo-pkgid.1

+6-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ fetched.
1919
.sp
2020
A package specifier consists of a name, version, and source URL. You are
2121
allowed to use partial specifiers to succinctly match a specific package as
22-
long as it matches only one package. The format of a \fIspec\fR can be one of the
23-
following:
22+
long as it matches only one package. This specifier is also used by other parts
23+
in Cargo, such as \fBcargo\-metadata\fR(1) and \fIJSON messages\fR <https://doc.rust\-lang.org/cargo/reference/external\-tools.html#json\-messages> emitted by Cargo.
24+
.sp
25+
The format of a \fIspec\fR can be one of the following:
2426

2527
.TS
2628
allbox tab(:);
@@ -242,4 +244,5 @@ cargo pkgid file:///path/to/local/package#foo
242244
.RE
243245
.RE
244246
.SH "SEE ALSO"
245-
\fBcargo\fR(1), \fBcargo\-generate\-lockfile\fR(1), \fBcargo\-metadata\fR(1), \fIPackage ID Specifications\fR <https://doc.rust\-lang.org/cargo/reference/pkgid\-spec.html>
247+
\fBcargo\fR(1), \fBcargo\-generate\-lockfile\fR(1), \fBcargo\-metadata\fR(1),
248+
\fIPackage ID Specifications\fR <https://doc.rust\-lang.org/cargo/reference/pkgid\-spec.html>, \fIJSON messages\fR <https://doc.rust\-lang.org/cargo/reference/external\-tools.html#json\-messages>

0 commit comments

Comments
 (0)