Skip to content

LSP exports too many symbols #683

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

Closed
compnerd opened this issue Dec 21, 2022 · 7 comments
Closed

LSP exports too many symbols #683

compnerd opened this issue Dec 21, 2022 · 7 comments
Labels
Windows Windows platform support

Comments

@compnerd
Copy link
Member

compnerd commented Dec 21, 2022

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
@ahoppen
Copy link
Member

ahoppen commented Dec 21, 2022

rdar://103582935

@ahoppen
Copy link
Member

ahoppen commented Jun 16, 2023

@compnerd Is this still an issue?

@compnerd
Copy link
Member Author

@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.

@MaxDesiatov
Copy link
Contributor

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?

@compnerd
Copy link
Member Author

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

swiftlang/swift-package-manager#5597 is the issue (I just was being lazy and trying to not dig it up).

@ahoppen ahoppen added the Windows Windows platform support label Jul 7, 2023
@krzyzanowskim
Copy link
Contributor

ref #982

@ahoppen
Copy link
Member

ahoppen commented Jan 12, 2025

I have worked around this by building swift-syntax as a dynamic library (SWIFTSYNTAX_BUILD_DYNAMIC_LIBRARY environment variable). Closing since there are no more actionable steps in SourceKit-LSP here.

@ahoppen ahoppen closed this as completed Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Windows Windows platform support
Projects
None yet
Development

No branches or pull requests

4 participants