Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: remove lexer->log calls for better compatibility #162

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

blindFS
Copy link
Contributor

@blindFS blindFS commented Nov 29, 2024

Hopefully this PR fixes recent reported crashes on discord:

woosaaahh — Today at 4:57 AM
Finaaaaaally !!!
After debugging nvim-treesitter, neovim lua code for tree-sitter then hours of manual bisect + compiling neovim, 
I think a found an explanation for my neovim crashes !

This commit is the first one that prevent my Neovim from crashing :
https://github.com/neovim/neovim/commit/664de5ea971440f24e3e7e3618786d01fbca6025
It bumps treesitter dependency from v0.22.6 to v0.23.0.

According this https://github.com/neovim/neovim/blob/release-0.10/cmake.deps/deps.txt#L56 ,
the latest stable release (v0.10.2) still uses treesitter v0.22.6.

My understanding is that all languages grammars/parsers/scanners that use 
treesitter v0.23.0 and more are not compatible with nvim v0.10.2 and below.

So with that in mind, I have 2 solutions :
1°) using nvim nightly and use the latest tree-sitter-nu
or
2°) keep using nvim v0.10.2 but using older version of tree-sitter-nu with custom nvim-treesitter config 
that point to a local copy of tree-sitter-nu (solution that I didn't tried yet)
https://github.com/nushell/tree-sitter-nu/commit/082a7c7df7db460da6b280c9f902bf2b19a2f423

EDIT: For solution 2°), I didn't find yet any compatible versions between neovim v0.10.2, nvim-treesitter and tree-sitter-nu,
so I'll use solution 1°) and neovim nightly until my brain figure it out
image

@mrdgo
Copy link
Contributor

mrdgo commented Nov 29, 2024

Well, this is annoying - but thanks for the finding! Will consider when calling tree-sitter generate next time.

@blindFS
Copy link
Contributor Author

blindFS commented Nov 29, 2024

@mrdgo do you have the environment to confirm this fix? Haven't tested it in old neovim yet.

@mrdgo
Copy link
Contributor

mrdgo commented Nov 29, 2024

I know how to do it, but would defer it for a couple of hours. Removing the logs doesn't hurt - we can also check afterwards, imo :)

@blindFS
Copy link
Contributor Author

blindFS commented Nov 29, 2024

Sure, no hurry.

@fdncred fdncred merged commit d8aae04 into nushell:main Nov 29, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants