Skip to content
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

swift-driver: correct the legacy driver path construction #1741

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

compnerd
Copy link
Member

Use URL to compute the new executable name. This is important to ensure that we correctly strip the executable suffix and re-apply it in the proper location if applicable. Without this change, on Windows, the fallback path would generate swiftc.exe-legacy-driver rather than swiftc-legacy-driver.exe for the basename of the C++ driver.

Use `URL` to compute the new executable name. This is important to
ensure that we correctly strip the executable suffix and re-apply it in
the proper location if applicable. Without this change, on Windows, the
fallback path would generate `swiftc.exe-legacy-driver` rather than
`swiftc-legacy-driver.exe` for the basename of the C++ driver.
@compnerd compnerd requested a review from artemcm November 27, 2024 16:36
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@swift-ci please test macOS platform

@compnerd
Copy link
Member Author

Please test with following PRs:
swiftlang/swift#77857

@swift-ci please test Windows platform

@compnerd
Copy link
Member Author

@swift-ci please test macOS platform

2 similar comments
@compnerd
Copy link
Member Author

@swift-ci please test macOS platform

@compnerd
Copy link
Member Author

compnerd commented Dec 2, 2024

@swift-ci please test macOS platform

@compnerd compnerd merged commit 44239e6 into swiftlang:main Dec 2, 2024
3 checks passed
@compnerd compnerd deleted the path branch December 2, 2024 22:03
@tshortli
Copy link
Contributor

tshortli commented Dec 3, 2024

@artemcm @compnerd is it possible this is related to Interpreter/shebang-env.swift failing on macOS and Linux smoke testing?

https://ci.swift.org/job/swift-PR-Linux/18443/console
https://ci.swift.org/job/swift-PR-macos/18840/console

@al45tair
Copy link
Contributor

al45tair commented Dec 3, 2024

I've merged the revert because it looks like this broke PR testing.

compnerd added a commit to compnerd/apple-swift that referenced this pull request Dec 4, 2024
swiftlang/swift-driver#1741 fixed a bug in the swift-driver which
exposed a bug in this test. The use of `%FileCheck` is a problem as that
sanitises the output substituting `BUILD_DIR` for the build directory
that is now properly computed. Because `PATH` is being configured to an
invalid path the actual driver is not found and the test fails.
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.

4 participants