You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ stack --version
Version 2.5.1, Git revision d6ab861544918185236cf826cb2028abb266d6d5 x86_64 hpack-0.33.0
Method of installation
Official binary, downloaded from stackage.org or fpcomplete's package repository
Problem
Previous versions of stack printed errors in such a way that compilation-mode in emacs would detect the error and you could execute M-x first-error or similar function to go to the first error, and you can traverse the errors with M-x next-error and such. I think I actually also had to set --no-interleaved-output to get this to work well too in the previous version of stack I was on.
The new version of stack that I'm using breaks this. I think it's simply that the file paths are indented a bit. Emacs (and vim for quickfix afaict) use filepaths on newlines for detecting these errors. This is very frustrating that first-error, next-error, etc are broken.
Is it possible to use compilation-mode with stack in a simple way and get output such that emacs detects the errors?
The text was updated successfully, but these errors were encountered:
The file-name where the error occurs has to be at the beginning of the line for emacs or vim to detect it as an error.
This is a pretty serious usability bug, in my humble opinion. I've honestly been a lot slower at fixing code because of this! I imagine that there are some people silently suffering that vim quickfix and emacs compilation-mode aren't working properly.
Okay, I built stack removing the indentation in Stack.Types.Build, and with --no-interleaved-output, compilation-mode started detecting errors again.
This issue is specific to having multiple packages in the same stack project. In a single package project, there is no extra indentation put in front of errors, and emacs/vim will detect the errors.
Stack version
Method of installation
Problem
Previous versions of stack printed errors in such a way that compilation-mode in emacs would detect the error and you could execute
M-x first-error
or similar function to go to the first error, and you can traverse the errors withM-x next-error
and such. I think I actually also had to set--no-interleaved-output
to get this to work well too in the previous version of stack I was on.The new version of stack that I'm using breaks this. I think it's simply that the file paths are indented a bit. Emacs (and vim for quickfix afaict) use filepaths on newlines for detecting these errors. This is very frustrating that
first-error
,next-error
, etc are broken.Is it possible to use
compilation-mode
with stack in a simple way and get output such that emacs detects the errors?The text was updated successfully, but these errors were encountered: