Comments (7)
This might be related:
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.Arrays.copyOfRange(Arrays.java:3664)
at java.lang.String.<init>(String.java:207)
at java.lang.String.substring(String.java:1969)
at java.lang.String.subSequence(String.java:2003)
at kotlin.text.StringsKt__StringsKt.commonPrefixWith(Strings.kt:775)
at kotlin.text.StringsKt__StringsKt.commonPrefixWith$default(Strings.kt:765)
at org.javacs.kt.position.PositionKt.changedRegion(position.kt:95)
at org.javacs.kt.CompiledFile.oldOffset(CompiledFile.kt:114)
at org.javacs.kt.CompiledFile.parseAtPoint(CompiledFile.kt:72)
at org.javacs.kt.signatureHelp.SignatureHelpKt.signatureHelpAt(signatureHelp.kt:22)
at org.javacs.kt.KotlinTextDocumentService.signatureHelp(KotlinTextDocumentService.kt:128)
at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:61)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint$$Lambda$35/698288148.apply(Unknown Source)
from kotlin-language-server.
Is incremental compilation needed for code completion or for what purpose? How does the kotlin-web-demo handle completion?
from kotlin-language-server.
@apatrida Each file needs to be compiled to an abstract syntax tree by the Kotlin compiler frontend. Using the AST, the language server can provide document symbols, code completion, hover and more.
The naive solution to this problem would be to compile the entire file every time the user makes an edit, but that would be extremly slow (and make your editor feel laggy). To address this problem, the language server currently extracts the expression around the cursor, puts it into a small "fake" file and tells the compiler to compile the "fake" file. Still, it would probably be better to use official compiler APIs as mentioned in the issue description.
The Kotlin demo seems to be promising in terms of performance, I will take a closer look at it soon.
from kotlin-language-server.
I don't know well enough how the current method works (lots of methods disappearing into 3rd party packages etc), but would this solve the synchronization issue where e.g. a property is referenced in one "expression" but doesnt exist yet, is added at the relevant location, yet the error that its missing still persists?
on a side note, is there a gitter or some other more convenient place where people can discuss this project with you?
from kotlin-language-server.
@Strum355 There is a new Gitter channel for this project:
from kotlin-language-server.
@fwcd I am also interested in incremental compilation, and what is the newest pointers on this? Thanks.
from kotlin-language-server.
Sounds very promising to improve performance. Is it complicated to add this?
from kotlin-language-server.
Related Issues (20)
- Extend "Add missing import" code action to suggest "static methods"/functions
- C interoperability support? HOT 3
- Crash on windows
- Automatically generate "thank you" message for all contributors in release script
- Dependency module <dependencies of main> was not initialized by the time contents of dependent module <dependencies of main> were queried HOT 1
- Add code completion for labels
- JsonSyntaxException on startup HOT 7
- Re-add semantic tokens for string literals without covering up interpolations
- Support java 21 HOT 1
- Despite best efforts a sea of red in vscode: MISSING_BUILT_IN_DECLARATION HOT 1
- language server won`t start after update gradle from 8.5 to 8.6 HOT 2
- Neovim + Android + Mason: Unresolved references for certain android dependencies
- Support for multi-module project HOT 4
- Extension fails on Ubuntu devcontainer - couldn't create connection to server. HOT 3
- java.util.concurrent.TimeoutException: Unable to connect language server
- Feature - disable extension on per-file basis to mitigate `Unresolved reference:` errors HOT 2
- Suppress a warning around SLF4J HOT 3
- Too many error messages and exceptions. HOT 1
- bug: Rename variable fails
- LSP causes configuration caching to fail
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kotlin-language-server.