rust-lang / miri

An interpreter for Rust's mid-level intermediate representation
Apache License 2.0
4.14k stars 318 forks source link

Fix "local crate" detection #3644

Closed narpfel closed 1 month ago

narpfel commented 1 month ago

PackageId is an opaque identifier whose internal format is subject to change, so looking up the names of local crates by ID is more robust than parsing the ID.

Resolves #3643.

saethlin commented 1 month ago

Doesn't cargo metadata have a --format-version flag to prevent silent breakage like this? is cargo_metadata not using that flag? If it's not, can we add it to prevent future issues like this?

RalfJung commented 1 month ago

I think this cargo change was not considered a breaking change since there was never any guarantee about the format of that field. Some clients (Miri included) just used the field in ways that was never intended or supported.

RalfJung commented 1 month ago

Looks good, thanks! @bors r+

bors commented 1 month ago

:pushpin: Commit 0a58833faa03ad10aca64292b6ca4b2d07bbf107 has been approved by RalfJung

It is now in the queue for this repository.

bors commented 1 month ago

:hourglass: Testing commit 0a58833faa03ad10aca64292b6ca4b2d07bbf107 with merge 38e318ccd255a090eb57e19d2aac5ed2ec0e2b92...

bors commented 1 month ago

:sunny: Test successful - checks-actions Approved by: RalfJung Pushing 38e318ccd255a090eb57e19d2aac5ed2ec0e2b92 to master...