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 2
2
//!
3
3
//! [`--unit-graph`]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#unit-graph
4
4
5
+ use cargo_util_schemas:: core:: PackageIdSpec ;
6
+
5
7
use crate :: core:: compiler:: Unit ;
6
8
use crate :: core:: compiler:: { CompileKind , CompileMode } ;
7
9
use crate :: core:: profiles:: { Profile , UnitFor } ;
8
- use crate :: core:: { PackageId , Target } ;
10
+ use crate :: core:: Target ;
9
11
use crate :: util:: interning:: InternedString ;
10
12
use crate :: util:: CargoResult ;
11
13
use crate :: GlobalContext ;
@@ -47,7 +49,7 @@ struct SerializedUnitGraph<'a> {
47
49
48
50
#[ derive( serde:: Serialize ) ]
49
51
struct SerializedUnit < ' a > {
50
- pkg_id : PackageId ,
52
+ pkg_id : PackageIdSpec ,
51
53
target : & ' a Target ,
52
54
profile : & ' a Profile ,
53
55
platform : CompileKind ,
@@ -109,7 +111,7 @@ pub fn emit_serialized_unit_graph(
109
111
} )
110
112
. collect ( ) ;
111
113
SerializedUnit {
112
- pkg_id : unit. pkg . package_id ( ) ,
114
+ pkg_id : unit. pkg . package_id ( ) . to_spec ( ) ,
113
115
target : & unit. target ,
114
116
profile : & unit. profile ,
115
117
platform : unit. kind ,
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ fn simple() {
68
68
"feata"
69
69
],
70
70
"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] ",
72
72
"platform": null,
73
73
"profile": {
74
74
"codegen_backend": null,
@@ -113,7 +113,7 @@ fn simple() {
113
113
"featb"
114
114
],
115
115
"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] ",
117
117
"platform": null,
118
118
"profile": {
119
119
"codegen_backend": null,
@@ -151,7 +151,7 @@ fn simple() {
151
151
"featc"
152
152
],
153
153
"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] ",
155
155
"platform": null,
156
156
"profile": {
157
157
"codegen_backend": null,
@@ -194,7 +194,7 @@ fn simple() {
194
194
],
195
195
"features": [],
196
196
"mode": "build",
197
- "pkg_id": "foo 0.1.0 ( path+[ROOTURL]/foo) ",
197
+ "pkg_id": "path+[ROOTURL]/foo#0.1.0 ",
198
198
"platform": null,
199
199
"profile": {
200
200
"codegen_backend": null,
You can’t perform that action at this time.
0 commit comments