Skip to content

[sourcekit-lsp] Prefer containing toolchain if applicable #139

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 4 commits into from
Aug 10, 2019

Conversation

benlangmuir
Copy link
Contributor

If the sourcekit-lsp binary is embedded inside a toolchain, pass that install path to the toolchain registry and use it by default.

In preparation for looking for toolchain next to the sourcekit-lsp
binary, teach toolchain loading to find the info plist even if we are
using the path `Foo.xctoolchain/usr/bin` instead of `Foo.xctoolchain`.
When the ToolchainRegistry is used in code embedded into a toolchain, we
want to prefer that toolchain over any other search paths other than the
explicit SOURCEKIT_TOOLCHAIN_PATH environment.
When sourcekit-lsp is embedded inside a toolchain, use its main bundle
path as the install path to have the toolchain registry prefer that
toolcahin.
There is not guarantee that the toolchain.path contains `usr/bin`.
Instead, look at the diretory containing `swiftc`.
@benlangmuir
Copy link
Contributor Author

@swift-ci please test

@benlangmuir benlangmuir merged commit d82d0d0 into swiftlang:master Aug 10, 2019
@benlangmuir benlangmuir deleted the find-your-inner-toolchain branch August 10, 2019 00:35
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.

1 participant