atom-elmjutsu
atom-elmjutsu copied to clipboard
Elmjutsu doesn't check for errors in tests
Compiler errors in test files aren't not shown. The expected behavior is for Elmjutsu to underline the error in red and list it in a separate tab like it does with Elm files outside of tests.
Hi, do you have elm-test installed? Elmjutsu uses elm-test to check for compiler errors in test files.
Yes, I have "elm-test": "^0.19.0-rev3"
installed in my npm packages.
Edit: I also tested upgrading it to rev4. Still don't get any error message in the editor.
Try setting "Elm Test Path" in elmjutsu setting. By default it requires elm-test
to be installed globally.
I believe relative path from project root should work (might be wrong though).
I tried adding a path to elm-tests but still no luck. One thing I've noticed is that, after saving, the busy spinner shows the following indefinitely
Describe your environment thoroughly please, especially elmjutsu version, linter version, other possibly related packages. The easy way is call "Linter: Debug" from command palette (cmd + shift + P in mac) and copy the resultant.
Also try:
- Completely exit Atom and start up clean (wait a while for all package startups done before triggering Lint)
- Make sure
elm-test
succeeds in your project outside of Atom (from terminals)
Personally I'm using Linter with linter-ui-default, and elm-test globally installed.
If the issue is related to atom-ide-ui
and/or relatively installed elm-test, I do not have much experience on them.
Normally I use atom-ide-ui
. For this I've disabled that and installed linter
(v2.2.0 since the #153 bug is open).
Running Linter: debug
shows:
Atom Version: 1.34.0
Linter Version: 2.2.0
Opened file is ignored: No
Matching Linter Providers:
- Elm
Disabled Linter Providers:
Standard Linter Providers:
- Elm
Indie Linter Providers:
UI Providers:
- Linter
Ignore Glob: **/*.min.{js,css}
VCS Ignored Paths are excluded: true
Current File Scopes:
- *
- source.elm
Completely exiting Atom and starting fresh doesn't seem to help. I've run elm-test
from the command line and that correctly compiles and runs tests. I've also tries changing the relative path to elm-test
into an absolute path and that doesn't help (if I make a typo in the path, Elmjutsu will still tell me it can't find elm-test
).
Hmm, no easy fix from me. Cannot tell if it is elmjutsu problem or specific to your environment.
My usual debug process around elmjutsu and other Atom packages:
- Turn on "Log Debug Messages" in the bottom of elmjutsu setting, check console log by opening dev console
- Print debug! Insert
console.log
here and there in suspicious packages' JS files and reload Atom, check dev console
@MartinSStewart, can you post the elmjutsu section in your ~/.atom/config.cson
? Also, what's the value of "source-directories"
in your elm.json
? Thanks!
Sorry about the delay.
Here's the config.cson (I've changed the extension so that github would let me upload it directly) config.txt
As for source-directories
:
"source-directories": [
"src"
]
@ymtszw Thanks, I'll have a look at the debug output later if I have time.
Edit: I looked at the debug output and noticed that this error is shown repeatedly
Hi @MartinSStewart, elmTestExecPath
should point to the elm-test.exe
binary.
I don't have an elm-test.exe
but I do have a elm-test
file, are they the same thing? I've tried giving a path to it and it seems to work just as well as giving a path to the folder that it's in (which is to say, it doesn't work, but at least Elmjutsu doesn't give an error about not finding elm-test
)
In my Windows 10 env,
- Node.js(8.12.0) and Yarn(1.10.1) installed, both versions built for windows, downloaded from official websites
- Elm and
elm-test
installed viayarn
(from PowerShell or cmd.exe) - In Elmjutsu setting:
- Elm Path:
C:\Users\<Username>\AppData\Local\Yarn\bin\elm
- Elm Test Path:
C:\Users\<Username>\AppData\Local\Yarn\bin\elm-test
- Elm Path:
And everything working well. Installed related packages are:
- elmjutsu 9.11.0
- elm-format
- language-elm (personal fork)
- Linter 2.3.0
- linter-ui-default 1.7.1
- hyperclick 0.1.5