LS4P
LS4P copied to clipboard
[BUG] Server crashes due to not finding processing core maps
Bug:
With a fresh install of the ls and Ubuntu 20.04.4 LTS. The server comes with a error message and shuts down
internal/fs/utils.js:307
throw err;
^
Error: ENOENT: no such file or directory, open '/home/efratror/Downloads/LS4P-master/server/out/processing/extractor/processing/CORE/PApplet.class'
at Object.openSync (fs.js:476:3)
at Object.func [as openSync] (electron/js2c/asar_bundle.js:5:1846)
at Object.readFileSync (fs.js:377:35)
at Object.readFileSync (electron/js2c/asar_bundle.js:5:8872)
at JavaClassFileReader.readFromFile (/home/efratror/Downloads/LS4P-master/server/node_modules/java-class-tools/lib/java-class-reader.js:97:29)
at JavaClassFileReader.read (/home/efratror/Downloads/LS4P-master/server/node_modules/java-class-tools/lib/java-class-reader.js:50:21)
at /home/efratror/Downloads/LS4P-master/server/out/completion.js:54:77
at Array.forEach (<anonymous>)
at /home/efratror/Downloads/LS4P-master/server/out/completion.js:53:29
at Array.forEach (<anonymous>) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/home/efratror/Downloads/LS4P-master/server/out/processing/extractor/processing/CORE/PApplet.class'
}
These is because ubuntu has a case-sensitive filesystem and A.txt an a.txt are two different files.
Solution:
Rename the moduletypes to all lower-case so that the filesystem can find them
https://github.com/processing-language-server/LS4P/blob/1998f6e973460b392da3d2bcfa53da494970b9c5/server/src/completion.ts#L24-L31