|
1 | 1 | # Troubleshooting
|
2 | 2 |
|
3 |
| -## Atom: Failed to load `ide-kotlin` package grammar |
4 |
| - |
5 |
| -### A dynamic link library (DLL) initialization routine failed / The module was compiled against a different Node.js version using `NODE_MODULE_VERSION` X, but requires `NODE_MODULE_VERSION` Y |
6 |
| - |
7 |
| -Run `./gradlew :editors:atom:apmRebuild` (or inside `editors/atom`: `apm rebuild`). |
8 |
| - |
9 |
| -See also [this issue](https://github.com/tree-sitter/tree-sitter/issues/377) and [the Electron docs](https://electronjs.org/docs/tutorial/using-native-node-modules) on how to rebuild. |
10 |
| - |
11 |
| -## Language Server: The tests fail with `java.lang.NoSuchMethodError` |
12 |
| -* After updating the Kotlin version, there may be multiple copies of the compiler plugin in `lib-kotlin`, for example: |
13 |
| - |
14 |
| -``` |
15 |
| -lib-kotlin |
16 |
| -├───j2k-1.2.72-release-68.jar <- old version |
17 |
| -├───j2k-1.3.11-release-272.jar |
18 |
| -├───kotlin-plugin-1.2.72-release-68.jar <- old version |
19 |
| -└───kotlin-plugin-1.3.11-release-272.jar |
20 |
| -``` |
21 |
| - |
22 |
| -* The issue is that the compiler finds multiple versions of the same class on the classpath |
23 |
| -* To fix this, simply remove the older JARs |
24 |
| -* If that still does not work, delete the entire `lib-kotlin` folder |
25 |
| - * Gradle will automatically re-download the necessary files once the project is built again |
26 |
| - |
27 |
| -## VSCode: Running `npm run compile` or `vsce package` fails |
28 |
| -If you get the error |
29 |
| - |
30 |
| -``` |
31 |
| -error TS6059: File '.../KotlinLanguageServer/bin/vscode-extension-src/...' is not under 'rootDir' '.../KotlinLanguageServer/vscode-extension-src'. 'rootDir' is expected to contain all source files. |
32 |
| -``` |
33 |
| - |
34 |
| -delete the `bin` folder in the repository directory. |
35 |
| - |
36 |
| - |
37 | 3 | ## java.lang.OutOfMemoryError when running language server
|
38 |
| -The language server is currently a memory hog, mostly due to its use of an in-memory database for symbols (ALL symbols from dependencies etc.!). This makes it not work well for machines with little RAM. If you experience out of memory issues, and still have lots of RAM, the default heap space might be too low. You might want to try tweaking the maximum heap space setting by setting `-Xmx8g` (which sets the heap size to 8GB. Change the number to your needs). This can be done by setting the `JAVA_OPTS` environment variable. |
39 |
| - |
40 | 4 |
|
41 |
| -In [the VSCode extension](https://github.com/fwcd/vscode-kotlin), this is in the extension settings in the setting `Kotlin > Java: Opts`. |
| 5 | +The language server is currently a memory hog, mostly due to its use of an in-memory database for symbols (ALL symbols from dependencies etc.!). This makes it not work well for machines with little RAM. If you experience out of memory issues, and still have lots of RAM, the default heap space might be too low. You might want to try tweaking the maximum heap space setting by setting `-Xmx8g` (which sets the heap size to 8GB. Change the number to your needs). This can be done by setting the `JAVA_OPTS` environment variable. |
42 | 6 |
|
| 7 | +In [the VSCode extension](https://github.com/fwcd/vscode-kotlin), this is in the extension settings in the setting `Kotlin > Java: Opts`. |
43 | 8 |
|
44 | 9 | If you use Emacs, you can try the `setenv` function to set environment variables. Example: `(setenv "JAVA_OPTS" "-Xmx8g")`.
|
0 commit comments