Skip to content

Commit b5ced31

Browse files
committed
Auto merge of #120187 - Nadrieril:rollup-xfwrb0c, r=Nadrieril
Rollup of 8 pull requests Successful merges: - #116090 (Implement strict integer operations that panic on overflow) - #118811 (Use `bool` instead of `PartiolOrd` as return value of the comparison closure in `{slice,Iteraotr}::is_sorted_by`) - #119081 (Add Ipv6Addr::is_ipv4_mapped) - #119461 (Use an interpreter in MIR jump threading) - #119996 (Move OS String implementation into `sys`) - #120015 (coverage: Format all coverage tests with `rustfmt`) - #120027 (pattern_analysis: Remove `Ty: Copy` bound) - #120084 (fix(rust-analyzer): use new pkgid spec to compare) r? `@ghost` `@rustbot` modify labels: rollup
2 parents bc1124a + 622256d commit b5ced31

File tree

1 file changed

+14
-2
lines changed
  • crates/proc-macro-srv/proc-macro-test

1 file changed

+14
-2
lines changed

crates/proc-macro-srv/proc-macro-test/build.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,24 @@ fn main() {
9292
panic!("proc-macro-test-impl failed to build");
9393
}
9494

95+
// Old Package ID Spec
96+
let repr = format!("{name} {version}");
97+
// New Package Id Spec since rust-lang/cargo#13311
98+
let pkgid = String::from_utf8(
99+
Command::new(toolchain::cargo())
100+
.current_dir(&staging_dir)
101+
.args(["pkgid", name])
102+
.output()
103+
.unwrap().stdout,
104+
)
105+
.unwrap();
106+
let pkgid = pkgid.trim();
107+
95108
let mut artifact_path = None;
96109
for message in Message::parse_stream(output.stdout.as_slice()) {
97110
if let Message::CompilerArtifact(artifact) = message.unwrap() {
98111
if artifact.target.kind.contains(&"proc-macro".to_string()) {
99-
let repr = format!("{name} {version}");
100-
if artifact.package_id.repr.starts_with(&repr) {
112+
if artifact.package_id.repr.starts_with(&repr) || artifact.package_id.repr == pkgid {
101113
artifact_path = Some(PathBuf::from(&artifact.filenames[0]));
102114
}
103115
}

0 commit comments

Comments
 (0)