Closed la0bing closed 2 months ago
Hey,
Thanks for your issue, do you maybe also have an input file where this reproduces on? That would aid debugging alot!
I found at least one issue with the size accounting in the serialization function. Are you by chance able to check if it helps? Its hard to tell, i tried reproducing the issue with some prepared heredocs but wasnt able to.
weirdly after i tried disabling for terraform and re-enabling it i wasnt able to consistantly reproduce it, I have attached a somewhat sanatized version of the file i was facing issue with not sure if this will help. Appreciate the help thanks. file: test.txt
weirdly after i tried disabling for terraform and re-enabling it i wasnt able to consistantly reproduce it, I have attached a somewhat sanatized version of the file i was facing issue with not sure if this will help. Appreciate the help thanks. file: test.txt
Wasnt able to reproduce with this file, but let me merge the PR to fix the obvious issue first and Ill keep the issue open.
Edit: cannot merge anymore
@la0bing ~ this was closed automatically by merging #47; let me reopen the issue. Can you please check ( once nvim-treesitter updated the revision ) if this fixes your issue?
@la0bing ~ this was closed automatically by merging #47; let me reopen the issue. Can you please check ( once nvim-treesitter updated the revision ) if this fixes your issue?
thanks for the quick fix on this, not entirely sure if its fixed by this change but I can't seems to reproduce the issue ever since I've disabled and re-enable it, but after updating it I am not facing this issue anymore as well
@la0bing Ok, then let me close the issue; if you see it again please feel free to reopen!
Hey guys, sorry to ask this question, but how can I use the commit (80784600ec08ff2d677362a8a9fd9101c798b49c) in #47 ? I'm using LunarVim and this error is making it to crash? Lazy is the plugin manager used by LunarVim.
Are you using nvim-treesitter? In that case it should suffice to just bump its version to latest main. The version of this Parser was bumped there already
@MichaHoffmann , thank you for the blazing fast response. Yep, I'm using nvim-treesitter. I was update to update to the latest main, but it seems there are some breaking changes, and nvim-treesitter is not able to run at all afterwards :\ . Maybe I'll need to open an issue with LunarVim.
I don't know lunar vim but maybe updating the neovim version would help. Are you running recent neovim?
$ nvim --version
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1716656478
Same for me
$ nvim --version
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1693350652
Yep, that's why I suspect it has something to do with the lunarvim's configuration.
Problem
I am getting the following error when trying to navigate in the nvim editor, on a terraform file, either typing or basic operation throws this and returns me back to the shell:
Assertion failed: (length <= TREE_SITTER_SERIALIZATION_BUFFER_SIZE), function ts_parser__external_scanner_serialize, file parser.c, line 404
Reference
https://github.com/tree-sitter/tree-sitter/issues/3406
Steps to reproduce
My configuration is just using the default AstroNVim installation.
and from here on when i try editing a terraform file it just randomly starts crashing. I've tried using different distros of vim but seems to be still facing the same issue.
Expected behavior
It should not crash.
Tree-sitter version (tree-sitter --version)
tree-sitter 0.22.6
Operating system/version
macOS 14.5