vivekmalneedi / veridian

A SystemVerilog Language Server
MIT License
134 stars 15 forks source link

Update toolchain and improve verible syntax parsing #179

Closed Andful closed 1 year ago

Andful commented 1 year ago

Not updating sv-parser due to the conversation at https://github.com/vivekmalneedi/veridian/pull/176#discussion_r1122616240

Upgrading this is a little dangerous. I pushed my own attempt into the bump_deps branch, but the gist of it is that I think the version I was using hit a sweet spot where I could pass all my tests that involved parsing invalid code (by attempting to remove lines with syntax errors and rerunning the parse). After the upgrade that no longer seemed to be the case. There is a allow_incomplete flag now, which I think you set to true but that causes it to discard large parts of the syntax tree, which for the tests is effectively the entire tree. This might be worth the price regardless if the syntax tree it returns on "real" code is good enough for the language server to still be helpful.

The correct solution to this issue is to use a fault-tolerant IDE parser and I have new indexing code that uses treesitter to parse in the develop branch, but I haven't had time to actually rewrite the rest of veridian to accommodate it.

Andful commented 1 year ago

No worries! Oh yeah! test do pass with an updated version of sv-parser. Tell me if you want the commits squashed.

Andful commented 1 year ago

Not sure why tests are failing. Will look at this tomorrow!

Andful commented 1 year ago

No worries! Oh yeah! test do pass with an updated version of sv-parser. Tell me if you want the commits squashed.

Nvm. They don't pass with the updated version.

Not sure why tests are failing. Will look at this tomorrow!

That is what caused the tests to fail.