nim-lang / nim-mode

An emacs major mode for the Nim programming language
138 stars 46 forks source link

compilation error regexp broken for stacktrace #171

Closed krux02 closed 6 years ago

krux02 commented 7 years ago

In the past, entries from the stack trace were clickable, now this does not work anymore since this commit: https://github.com/nim-lang/nim-mode/commit/474d4c716fcc6cf058b1aa582d0cf9dfc236fdbf. Entries in the stack trace do not have a column. That part needs to stay optional.

My current compilation error regexp is this:

(add-to-list
 'compilation-error-regexp-alist-alist
 '(nim "^\\([[:alnum:]\\/_.-]*\\.nims?\\)(\\([[:digit:]]*\\)\\(?:, ?\\([[:digit:]]*\\)\\)?) \\(Warning:\\)?\\(\\(?:template/generic instantiation from here\\)\\|\\(?:Hint:\\)\\)?\\(?:Error\\)?" 1 2 3 (4 . 5)))

This also changes that a hint is not seen as a warning, but just a compiler message.

yuutayamada commented 7 years ago

Sorry about that. I don't like to having emacs' regex and wanted to use rx.el

Entries in the stack trace do not have a column. That part needs to stay optional.

Which part are you referring? or can you show me test code for that?

This also changes that a hint is not seen as a warning, but just a compiler message.

Should the "Hint" be treated as INFO? I'm not sure the difference though

krux02 commented 7 years ago

Here is a screenshot of an example stack trace, as you see, there is no column, but I would like the regexp to match those entries, too. fobbar

And the last part, yes I think the Hint should be treated as info at the moment it is treated as a warning. It doesn't really matter that much, but least it makes a difference for the two different functions in macros: info, warning.

krux02 commented 7 years ago

and normally I use re-builder within emacs. Very helpful.