Skip to content

[cxx-interop] Enable -verify-additional-file tests on Windows #80694

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

Merged
merged 2 commits into from
Apr 22, 2025

Conversation

j-hui
Copy link
Contributor

@j-hui j-hui commented Apr 9, 2025

These previously failed because they used '/' as the path separator instead of ''. While both are accepted on Windows, the latter is preferred and used to construct new paths, such as the path of imported header files. This inconsistency led to distinct buffer ID numbers being created (since paths are not canonicalized in BufferIdentIDMap), leading -verify to fail to associate the error emitted from the included file with the error expected in the -verify-additional-file file.

This patch re-enables these tests but uses %{fs-sep} in place of '/', to ensure the appropriate path separator is used for the platform where the test is run.

rdar://148928101

@j-hui j-hui marked this pull request as draft April 9, 2025 19:32
@j-hui
Copy link
Contributor Author

j-hui commented Apr 9, 2025

Gonna let this sit in draft until some CI results come back.

@j-hui
Copy link
Contributor Author

j-hui commented Apr 9, 2025

@swift-ci please test

These previously failed because they used '/' as the path separator
instead of '\'. While both are accepted on Windows, the latter is
preferred and used to construct new paths, such as the path of imported
header files. This inconsistency led to distinct buffer ID numbers being
created (since paths are not canonicalized in BufferIdentIDMap), leading
-verify to fail to associate the error emitted from the included file
with the error expected in the -verify-additional-file file.

This patch re-enables these tests but uses %{fs-sep} in place of '/', to
ensure the appropriate path separator is used for the platform where the
test is run.

rdar://148928101
@j-hui j-hui force-pushed the fix-verify-additional-file-windows branch from 42a567c to 8ff4d94 Compare April 9, 2025 20:26
@j-hui
Copy link
Contributor Author

j-hui commented Apr 9, 2025

@swift-ci please smoke test

@Xazax-hun
Copy link
Contributor

@swift-ci please smoke test

Copy link
Contributor

@egorzhdan egorzhdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for going through these tests!

I still consider this a compiler bug though.

@j-hui j-hui marked this pull request as ready for review April 22, 2025 22:31
@j-hui j-hui merged commit 8e19f3f into swiftlang:main Apr 22, 2025
3 checks passed
@j-hui j-hui deleted the fix-verify-additional-file-windows branch April 22, 2025 22:32
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.

3 participants