atom-language-idris
atom-language-idris copied to clipboard
changeDirectory() doesn't work with Idris 2
The idris2's :cd command requires a quoted string, but the changeDirectory() function does not surround the dir variable with quotes. As a result of this, there are the errors:
Expected string begin.
(Interactive):1:5--1:6
1 | :cd /home/demo/Documents/Idris2
More than that, if the directory path contains a quote (for example, /"tmp), the plugin hangs at Idris: opening REPL ....
The corresponding change in emacs idris-mode: https://github.com/idris-hackers/idris-mode/commit/762eda0a047f25ac76854f86ad3a1c7910b96c95#diff-57c9b17a4d33ee59f640d96a562f576b22d600b5adb02038a989e8eb1d2e76c5R89
I think the compiler is restarted every time any of the compilerOptions change, including the source directory, which makes the invocation of :cd redundant. And currently, I can't reproduce this bug, even though I've hit it before. In fact, I can't tell if that code path is even executed.