File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 22//!
33//! [`--unit-graph`]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#unit-graph
44
5+ use cargo_util_schemas:: core:: PackageIdSpec ;
6+
57use crate :: core:: compiler:: Unit ;
68use crate :: core:: compiler:: { CompileKind , CompileMode } ;
79use crate :: core:: profiles:: { Profile , UnitFor } ;
8- use crate :: core:: { PackageId , Target } ;
10+ use crate :: core:: Target ;
911use crate :: util:: interning:: InternedString ;
1012use crate :: util:: CargoResult ;
1113use crate :: GlobalContext ;
@@ -47,7 +49,7 @@ struct SerializedUnitGraph<'a> {
4749
4850#[ derive( serde:: Serialize ) ]
4951struct SerializedUnit < ' a > {
50- pkg_id : PackageId ,
52+ pkg_id : PackageIdSpec ,
5153 target : & ' a Target ,
5254 profile : & ' a Profile ,
5355 platform : CompileKind ,
@@ -109,7 +111,7 @@ pub fn emit_serialized_unit_graph(
109111 } )
110112 . collect ( ) ;
111113 SerializedUnit {
112- pkg_id : unit. pkg . package_id ( ) ,
114+ pkg_id : unit. pkg . package_id ( ) . to_spec ( ) ,
113115 target : & unit. target ,
114116 profile : & unit. profile ,
115117 platform : unit. kind ,
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ fn simple() {
6868 "feata"
6969 ],
7070 "mode": "build",
71- "pkg_id": "a 1.0.0 ( registry+https://github.com/rust-lang/crates.io-index) ",
71+ "pkg_id": "registry+https://github.com/rust-lang/crates.io-index#[email protected] ", 7272 "platform": null,
7373 "profile": {
7474 "codegen_backend": null,
@@ -113,7 +113,7 @@ fn simple() {
113113 "featb"
114114 ],
115115 "mode": "build",
116- "pkg_id": "b 1.0.0 ( registry+https://github.com/rust-lang/crates.io-index) ",
116+ "pkg_id": "registry+https://github.com/rust-lang/crates.io-index#[email protected] ", 117117 "platform": null,
118118 "profile": {
119119 "codegen_backend": null,
@@ -151,7 +151,7 @@ fn simple() {
151151 "featc"
152152 ],
153153 "mode": "build",
154- "pkg_id": "c 1.0.0 ( registry+https://github.com/rust-lang/crates.io-index) ",
154+ "pkg_id": "registry+https://github.com/rust-lang/crates.io-index#[email protected] ", 155155 "platform": null,
156156 "profile": {
157157 "codegen_backend": null,
@@ -194,7 +194,7 @@ fn simple() {
194194 ],
195195 "features": [],
196196 "mode": "build",
197- "pkg_id": "foo 0.1.0 ( path+[ROOTURL]/foo) ",
197+ "pkg_id": "path+[ROOTURL]/foo#0.1.0 ",
198198 "platform": null,
199199 "profile": {
200200 "codegen_backend": null,
You can’t perform that action at this time.
0 commit comments