Description
The new haskell stack tool outputs compilation errors shifted by 4 spaces right, which breaks highlighting of errors, since haskell-compilation-error-regexp-alist
has a regex that must start a line with no spaces.
Example compilation output that's not highlighted:
-*- mode: haskell-compilation; default-directory: "~/workspace/protocol-buffers/" -*-
HsCompilation started at Wed Jul 15 02:09:36
cd /Users/kb/workspace/protocol-buffers/ && stack build
hprotoc-2.1.3-0bfa2fc6ae7966890c323cb09dc4b57f: unregistering (missing dependencies: alex, protocol-buffers, protocol-buffers-descriptor)
protocol-buffers-2.1.3-a9fbe21f68c562356c7d2b85e44d031e: unregistering (local file changes)
protocol-buffers-descriptor-2.1.3-c816db2c5a31354b20177edcb197fe2f: unregistering (missing dependencies: protocol-buffers)
protocol-buffers-2.1.3: build
alex-3.1.4: configure
alex-3.1.4: build
alex-3.1.4: install
Progress: 2/4
-- While building package protocol-buffers-2.1.3 using:
/usr/local/bin/runhaskell -package=Cabal-1.18.1.5 -clear-package-db -global-package-db -package-db=/Users/kb/.stack/snapshots/x86_64-osx/lts-2.16/7.8.4/pkgdb/ /var/folders/7l/3ys9j0lx20j6z69lm6s_9r780000gn/T/stack41978/Setup.hs --builddir=.stack-work/dist/x86_64-osx/Cabal-1.18.1.5/ build
Process exited with code: ExitFailure 1
Logs have been written to: "/Users/kb/workspace/protocol-buffers/.stack-work/logs/protocol-buffers-2.1.3.log"
Building protocol-buffers-2.1.3...
Preprocessing library protocol-buffers-2.1.3...
[10 of 10] Compiling Text.ProtocolBuffers ( Text/ProtocolBuffers.hs, .stack-work/dist/x86_64-osx/Cabal-1.18.1.5/build/Text/ProtocolBuffers.o )
Text/ProtocolBuffers.hs:54:1: parse error on input ‘import’
HsCompilation exited abnormally with code 1 at Wed Jul 15 02:09:54
You can see that part Text/ProtocolBuffers.hs:54:1: parse error on input ‘import’
is not being highlighed as a hyperlink.
I propose improving haskell-compilation-error-regexp-alist
variable by allowing spaces in line-beginning.
I'm really bad at elisp (especially its regexes, string, escaping syntax etc), so probably would be better if some of you would fix this. I quick-fixed this by removing ^
symbol to just match anywhere, not at line-beginning, but better would be to explicitly only allow spaces.
Thank you!