semgrep / ocaml-tree-sitter-semgrep

Generate parsers from tree-sitter grammars extended to support Semgrep patterns
GNU General Public License v3.0
4 stars 10 forks source link

Update the ocaml-tree-sitter runtime library #510

Closed mjambon closed 2 months ago

mjambon commented 2 months ago

This required reverting changes for the following languages because the Semgrep integration wasn't in sync:

There was also a tricky bug occurring only in Semgrep which was due to tree-sitter-vue which was solved by patching tree-sitter-vue (it was declaring tree_sitter_html_* functions that were apparently picked by the linker instead of the real tree-sitter-html functions). Here's the modified version of tree-sitter-vue we're now using: https://github.com/ikatyang/tree-sitter-vue/pull/30. I added a safeguard so that future updates of the tree-sitter-vue submodule fail gracefully if some tree_sitter_html_* functions make a comeback.

The accompanying pull requests are:

On my machine, regenerating the Hack grammar takes 16.4 GB of RAM. C# is the second biggest memory consumer with 14.2 GB.

Checklist

aryx commented 2 months ago

@yosefAlsuhaibani @brandonspark once this is merged you will need to restore your improvements to semgrep-go and other