Skip to content

Conversation

bnbarham
Copy link
Contributor

When DYLD_(FRAMEWORK|LIBRARY)_PATH is set, dlopen will first check if the basename of the provided path is within any of its search paths. Thus it's possible that only a single library is loaded for each toolchain, rather than a separate like we expect. The paths should be equal in this case, since the client plugin is loaded based on the path of sourcekitd.framework (and we should only have one for the same reason). Allow this case and just avoid re-initializing.

@bnbarham
Copy link
Contributor Author

@swift-ci please test

When `DYLD_(FRAMEWORK|LIBRARY)_PATH` is set, `dlopen` will first check
if the basename of the provided path is within any of its search paths.
Thus it's possible that only a single library is loaded for each
toolchain, rather than a separate like we expect. The paths should be
equal in this case, since the client plugin is loaded based on the path
of `sourcekitd.framework` (and we should only have one for the same
reason). Allow this case and just avoid re-initializing.
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham
Copy link
Contributor Author

@swift-ci please test Windows platform

@bnbarham bnbarham merged commit 72b6e75 into swiftlang:main Sep 29, 2025
3 checks passed
@bnbarham bnbarham deleted the remove-precondition branch September 29, 2025 14:48
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