Skip to content

fix(driver): canonicalize target src_path before matching input file#12

Open
jakobjung10 wants to merge 1 commit into
zalanlevai:mainfrom
jakobjung10:fix/src-path-canonicalization
Open

fix(driver): canonicalize target src_path before matching input file#12
jakobjung10 wants to merge 1 commit into
zalanlevai:mainfrom
jakobjung10:fix/src-path-canonicalization

Conversation

@jakobjung10

Copy link
Copy Markdown

The Cargo target lookup compared the canonicalized rustc input path against target.src_path from Cargo metadata, which is not canonicalized. On Windows canonicalization prepends a \?\ verbatim prefix, so the plain equality never matched and target resolution panicked.

Canonicalize src_path at the comparison site so both sides are in the same form; a src_path that fails to canonicalize is treated as a non-match.

The Cargo target lookup compared the canonicalized rustc input path against
`target.src_path` from Cargo metadata, which is not canonicalized. On Windows
canonicalization prepends a `\?\` verbatim prefix, so the plain equality
never matched and target resolution panicked.

Canonicalize `src_path` at the comparison site so both sides are in the same
form; a `src_path` that fails to canonicalize is treated as a non-match.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant