Closed chrbirks closed 3 years ago
I just realized that older versions of Verilator don't report the column as part of the error message so it's not actually an error in svlangserver.
I don't know how complicated it would be to check which Verilator version is installed from inside the application but another fix could be to check how many elements in terms
is returned from the _splitTerms
function and use that number to determine if that version of Verilator returns a column.
$ verilator --version
Verilator 3.916 2017-11-25 rev verilator_3_914-65-g0478dbd
$ verilator --lint-only -Wall crc32_8.sv
%Error: crc32_8.sv:69: Duplicate declaration of signal: plus_one
%Error: crc32_8.sv:68: ... Location of original declaration
%Error: Exiting due to 1 error(s)
%Error: Command Failed /usr/bin/verilator_bin --lint-only -Wall crc32_8.sv
Thanks for reporting this! I will investigate both the approaches you have suggested, unless you want to take a stab at it. The version approach might be more difficult than it looks because user provided verilator command might have more args and I don't know how verilator would work in those cases if --version is added.
I can see if I can make a pull request for a fix this weekend. I'm no typescript expert but it shouldn't be very complicated if we can go for the solution of checking the size of the terms
array to decide if column is present.
Fixed in release 0.3.5
Hi I see an issue in Emacs with lsp-mode where the textDocument/publishDiagnostics message starts with the column number (17) of the warning. The line number (75) is parsed fine. As far as I can see this applies to all warnings and errors published by svlangserver and I have seen it for some time.
lsp-mode trace log:
Output of Verilator directly:
Other info