Skip to content

Conversation

egorzhdan
Copy link
Contributor

This reverts most of 72050c5, which led to decreased performance of jump-to-definition.

Instead of re-attempting to generate a module interface with C++ interop enabled, Swift should rely on the IDE to pass the correct -cxx-interoperability-mode= value to SourceKit.

rdar://149061322

@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label Sep 22, 2025
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@j-hui j-hui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I'm wondering: for projects built using, say, SwiftPM or Cmake, how would the IDE/sourcekit-lsp know which interop mode should be used?

@egorzhdan
Copy link
Contributor Author

@j-hui the -cxx-interoperability-mode= would be part of the arguments that the build system passes to the compiler, along with e.g. -target and -swift-version, so SourceKit will be able to pick that up.

This reverts most of 72050c5, which led to decreased performance of jump-to-definition.

Instead of re-attempting to generate a module interface with C++ interop enabled, Swift should rely on the IDE to pass the correct `-cxx-interoperability-mode=` value to SourceKit.

rdar://149061322
@egorzhdan egorzhdan force-pushed the egorzhdan/do-not-generate-interface-twice branch from 373130a to a610bcd Compare September 22, 2025 17:48
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan egorzhdan merged commit 62d388a into swiftlang:main Oct 7, 2025
3 checks passed
@egorzhdan egorzhdan deleted the egorzhdan/do-not-generate-interface-twice branch October 7, 2025 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants