Skip to content

Revert "Revert "swift-driver: correct the legacy driver path construction"" #1746

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 1 commit into from
Dec 5, 2024

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Dec 3, 2024

Reverts #1744

@compnerd
Copy link
Member Author

compnerd commented Dec 4, 2024

@swift-ci please test

@compnerd compnerd requested a review from tshortli December 4, 2024 22:36
@compnerd
Copy link
Member Author

compnerd commented Dec 4, 2024

Please test with following PRs:
swiftlang/swift-docc#1116

@swift-ci please test Windows platform

@compnerd compnerd requested a review from artemcm December 4, 2024 22:36
@compnerd compnerd merged commit 2c2a81e into main Dec 5, 2024
3 checks passed
@compnerd compnerd deleted the revert-1744-revert-1741 branch December 5, 2024 17:14
kateinoigakukun added a commit to kateinoigakukun/swift-driver that referenced this pull request Dec 11, 2024
`swift-driver` tries to invoke `swiftc-legacy-driver.` (trailing dot)
on non-Windows platforms when legacy driver is requested since
swiftlang#1746

This is because `URL.pathExtension` returns an empty string if the
URL does not have an extension but `URL.appendPathExtension` appends
a period before the extension even if given an empty string.
Thus `url.deletingPathExtension().appendingPathExtension(url.pathExtension)`
will not be equal to `url` if `url` does not have an extension.
kateinoigakukun added a commit that referenced this pull request Dec 12, 2024
`swift-driver` tries to invoke `swiftc-legacy-driver.` (trailing dot)
on non-Windows platforms when legacy driver is requested since
#1746

This is because `URL.pathExtension` returns an empty string if the
URL does not have an extension but `URL.appendPathExtension` appends
a period before the extension even if given an empty string.
Thus `url.deletingPathExtension().appendingPathExtension(url.pathExtension)`
will not be equal to `url` if `url` does not have an extension.
kateinoigakukun added a commit to kateinoigakukun/swift-driver that referenced this pull request Dec 12, 2024
`swift-driver` tries to invoke `swiftc-legacy-driver.` (trailing dot)
on non-Windows platforms when legacy driver is requested since
swiftlang#1746

This is because `URL.pathExtension` returns an empty string if the
URL does not have an extension but `URL.appendPathExtension` appends
a period before the extension even if given an empty string.
Thus `url.deletingPathExtension().appendingPathExtension(url.pathExtension)`
will not be equal to `url` if `url` does not have an extension.
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.

2 participants