Intermittant Failure Running elm-format
See original GitHub issueSometimes (but not always) VS Code will complain that running elm format failed. It seems like elm format does work (because the formatting on the file changes), but it’s still annoying. I’ve tried to fix this by setting the path to elm-format
, but it hasn’t been effective. I assume that running elm-format
is returning a non-zero result, but I don’t know enough to further debug it.
Expected Behavior
VS Code stops telling me to install elm-format
and gives me a more specific error.
Current Behavior
![Screen Shot 2021-02-25 at 1 16 37 PM](https://user-images.githubusercontent.com/2303837/109219296-09904800-777d-11eb-8e1a-6608902ba640.png)
![Screen Shot 2021-02-25 at 1 17 13 PM](https://user-images.githubusercontent.com/2303837/109219321-114fec80-777d-11eb-94d5-62b6656954cb.png)
![Screen Shot 2021-02-25 at 1 33 14 PM](https://user-images.githubusercontent.com/2303837/109220632-ccc55080-777e-11eb-9fdb-2a3fd7f1cb45.png)
Example of a weird “ghost” problem that I think is caused by this:
Possible Solution
It would be great to get more verbose about what went wrong. I have an elm-format
binary installed and it seems to work most of the time, so I don’t really know what’s going wrong.
Steps to Reproduce (for bugs)
Unfortunately, I don’t really have enough information to reproduce. I’ve done what I think is the standard thing - installing elm from a .pgk, use node to do a global install of elm-format
, etc.
Context
It’s annoying and it ?might? be causing ghost problems to be reported by VS Code. It’s common for errors to get “stuck” in my UI, which I can fix by restarting VS Code.
Your Environment
- Version used: 2.0.3
- Editor name and version (e.g. VSCode 1.36.1): 1.53.2
- Environment name and version (e.g. node.js 5.4): node v15.10.0, Elm 0.19.1, elm-format 0.8.5
- Operating System and version: OS X 10.15.7
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (5 by maintainers)
https://github.com/elm-tooling/elm-language-server/commit/6a6585e858b9970cf72053f81095eaf22ff13091 might help then
@Razzeee Building from source should be doable. I’ll take a look at it and report back if I manage it.