-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Frontend: use preferred path spellings for paths #81103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@swift-ci please smoke test |
@swift-ci please smoke test macOS platform |
CC: @j-hui |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting around to this. I think this is the right thing to do here (and avoids the lifetime issues I encountered in #80564).
However, I'm not convinced that this will close #81012 just yet because it only canonicalizes the path separators from -verify-additional-file
. My logging showed that the paths from -verify-additional-file
and from the capture error both have inconsistent path separators:
# .---command stderr------------
# | Got additional file: [[42]]::C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\swift\test\Interop\Cxx\foreign-reference/Inputs/inheritance.h
# | Captured error in [[2]]::C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\swift\test\Interop\Cxx\foreign-reference/Inputs\inheritance.h: 125
…
So, this patch should fix the problem for bufID [[42]]
here, but not bufID [[2]]
.
@swift-ci please smoke test |
Convert paths to the preferred spelling before passing it to the SourceManager to ensure that we have the canonical spelling. This is important as a path with a non-canonical path separator would otherwise fail to be looked up in the source manager buffer.
I think that fixing |
@swift-ci please test |
Convert paths to the preferred spelling before passing it to the SourceManager to ensure that we have the canonical spelling. This is important as a path with a non-canonical path separator would otherwise fail to be looked up in the source manager buffer.