sourcekit-lsp icon indicating copy to clipboard operation
sourcekit-lsp copied to clipboard

LSP exports too many symbols

Open compnerd opened this issue 2 years ago • 6 comments

When building LSP with SPM we hit the export symbol limits:

lld-link: error: too many exported symbols (max 65535)  
clang: error: linker command failed with exit code 1 (use -v to see invocation)                                        
[1/14] Linking S:\SourceCache\Sourcekit-LSP\.build\x86_64-unknown-windows-msvc\debug\_SourceKitLSP.dll

compnerd avatar Dec 21 '22 03:12 compnerd

rdar://103582935

ahoppen avatar Dec 21 '22 04:12 ahoppen

@compnerd Is this still an issue?

ahoppen avatar Jun 16 '23 14:06 ahoppen

@ahoppen I can double check, but I expect it to be so. This is caused by the use of swift-syntax. The underlying issue is SPM. It does not have the concept of libraries, and the code is built incorrect. The result of that is that we try to export all public symbols in swift-syntax, which exceeds the 65535 symbol limit. We can build with CMake, but this is a problem that we need to resolve.

compnerd avatar Jun 16 '23 14:06 compnerd

The underlying issue is SPM. It does not have the concept of libraries, and the code is built incorrect. The result of that is that we try to export all public symbols in swift-syntax, which exceeds the 65535 symbol limit. We can build with CMake, but this is a problem that we need to resolve.

Do we have a corresponding issue on the SwiftPM repository to track this?

MaxDesiatov avatar Jun 16 '23 15:06 MaxDesiatov

@MaxDesiatov 😧 making me do the work that I was trying to avoid! 😆

https://github.com/apple/swift-package-manager/issues/5597 is the issue (I just was being lazy and trying to not dig it up).

compnerd avatar Jun 16 '23 15:06 compnerd

ref https://github.com/apple/sourcekit-lsp/issues/982

krzyzanowskim avatar Dec 26 '23 22:12 krzyzanowskim