-
Notifications
You must be signed in to change notification settings - Fork 347
Highlight hyperlinks in "haskell-compile" when using stack #764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Just in case someone takes this, regex for skipping "Loading module" spam also could get this kind of an improvement! |
We need stack to stabilize it output a bit and then somebody that actively uses stack to contribute the relevant code. |
@gracjan how would you tell if stack's output is stabilized? It looks pretty stabilized to me, I think this error-reporting didn't change for 3 releases already (but need to check to be sure). I am actively using stack, so if no-one will step-up, I will make sure I understand involved elisp code and will add precisely what is needed then. |
@k-bx: It would be really appreciated if you did it. Some helpful information: Link to regexps in Emacs: http://www.gnu.org/software/emacs/manual/html_node/emacs/Regexps.html Also we need to make better engenireeng effort to not break things:
Note that we would like to have tests only for the regexp part, not for the whole compilation as that would be a bit too involved I think. |
@gracjan thanks for the tips! I'll try to do it then. If someone will want to step-in, please write here. |
@k-bx: Were you able to look at this? |
@gracjan so, I didn't do any hacking (just kept using my fork), but was indeed using stack and observing. Output is this: when you build a "main" project, stack's output is non-indented. When you build dependencies, if there's an error, stack will output it indented. So it should be fixed by regex fix, similar to the one I did for myself. I will take a look today if I can do that properly. Second problem which still exists is that, when you try to "go" by the error-file, emacs doesn't know where to find it, asking you to point it to the "root project directory". While pointing works fine, would be great to somehow make it know the dir by itself. Not sure how that could be done. |
Useful for stack tool, which renders dependency-errors indented Resolves haskell#764
@gracjan please review PR ^ |
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:
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!
The text was updated successfully, but these errors were encountered: