Skip to content

[5.9][SourceKit] Pass 'swiftc' path to Driver when creating frontend args #65151

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

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Apr 13, 2023

Cherry-pick #65068 into release/5.9

Explanation: libDriver uses its path to derive the plugin paths (i.e. lib/swift/host/plugins) Previously it was a constant string swiftc not an actual path, that caused SourceKit failed to find dylib plugins in the toolchain. Since SwiftLangSupport knows the swift-frontend path, use it, but replacing the filename with swiftc, to derive the plugin paths.
Scope: Legacy libDriver clients using getSingleFrontendInvocationFromDriverArguments currently only SourceKit
Risk: Low
Testing: Added regression test cases
Issue: rdar://107849796
Reviewer: Alex Hoppen (@ahoppen)

Driver uses its path to derive the plugin paths (i.e.
'lib/swift/host/plugins' et al.) Previously it was a constant string
'swiftc' that caused SourceKit failed to find dylib plugins in the
toolchain. Since 'SwiftLangSupport' knows the swift-frontend path,
use it, but replacing the filename with 'swiftc', to derive the plugin
paths.

rdar://107849796
(cherry picked from commit 3517db4)
@rintaro rintaro requested a review from a team as a code owner April 13, 2023 18:08
@rintaro
Copy link
Member Author

rintaro commented Apr 13, 2023

@swift-ci Please test

@rintaro rintaro merged commit c0043ab into swiftlang:release/5.9 Apr 14, 2023
@rintaro rintaro deleted the 5.9-sourcekit-pluginpath-rdar107849796 branch April 14, 2023 04:51
@AnthonyLatsis AnthonyLatsis added the 🍒 release cherry pick Flag: Release branch cherry picks label May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants