@@ -42,6 +42,9 @@ information during the build:
4242
4343The output goes to stdout in the JSON object per line format. The ` reason ` field
4444distinguishes different kinds of messages.
45+ The ` package_id ` field is a unique identifier for referring to the package, and
46+ as the ` --package ` argument to many commands. The syntax grammar can be found in
47+ chapter [ Package ID Specifications] .
4548
4649The ` --message-format ` option can also take additional formatting values which
4750alter the way the JSON messages are computed and rendered. See the description
@@ -53,6 +56,7 @@ messages.
5356
5457[ build command documentation ] : ../commands/cargo-build.md
5558[ cargo_metadata ] : https://crates.io/crates/cargo_metadata
59+ [ Package ID Specifications ] : ./pkgid-spec.md
5660
5761### Compiler messages
5862
@@ -66,7 +70,7 @@ structure:
6670 /* The "reason" indicates the kind of message. */
6771 " reason" : " compiler-message" ,
6872 /* The Package ID, a unique identifier for referring to the package. */
69- " package_id" : " my-package 0.1.0 (path+ file:///path/to/my-package) " ,
73+ " package_id" : " file:///path/to/my-package#0.1.0 " ,
7074 /* Absolute path to the package manifest. */
7175 " manifest_path" : " /path/to/my-package/Cargo.toml" ,
7276 /* The Cargo target (lib, bin, example, etc.) that generated the message. */
@@ -135,7 +139,7 @@ following structure:
135139 /* The "reason" indicates the kind of message. */
136140 " reason" : " compiler-artifact" ,
137141 /* The Package ID, a unique identifier for referring to the package. */
138- " package_id" : " my-package 0.1.0 (path+ file:///path/to/my-package) " ,
142+ " package_id" : " file:///path/to/my-package#0.1.0 " ,
139143 /* Absolute path to the package manifest. */
140144 " manifest_path" : " /path/to/my-package/Cargo.toml" ,
141145 /* The Cargo target (lib, bin, example, etc.) that generated the artifacts.
@@ -204,7 +208,7 @@ may be found in [the chapter on build scripts](build-scripts.md).
204208 /* The "reason" indicates the kind of message. */
205209 " reason" : " build-script-executed" ,
206210 /* The Package ID, a unique identifier for referring to the package. */
207- " package_id" : " my-package 0.1.0 (path+ file:///path/to/my-package) " ,
211+ " package_id" : " file:///path/to/my-package#0.1.0 " ,
208212 /* Array of libraries to link, as indicated by the `cargo::rustc-link-lib`
209213 instruction. Note that this may include a "KIND=" prefix in the string
210214 where KIND is the library kind.
0 commit comments