tree-sitter-cpp icon indicating copy to clipboard operation
tree-sitter-cpp copied to clipboard

bug: treesitter doesn't compile on Windows 11

Open Rumi152 opened this issue 3 months ago • 2 comments

Did you check existing issues?

  • [X] I have read all the tree-sitter docs if it relates to using the parser
  • [X] I have searched the existing issues of tree-sitter-cpp

Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)

tree-sitter 0.22.6 (b40f342067a89cd6331bf4c27407588320f3c263)

Describe the bug

When I try to build it throws this error:

src/parser.c:8:9: warning: '#pragma optimize' is not supported [-Wignored-pragma-optimize] 
#pragma optimize("", off) 
1 warning generated. 
src/scanner.c:126:5: error: expected expression 
static_assert(MAX_DELIMITER_LENGTH * sizeof(wchar_t) < TREE_SITTER_SERIALIZATION_BUFFER_SIZE, 
1 error generated.  

It was fixed (and the same steps still work and fix the error) in commit 2c93b82af7674e82e862d03133fd7abe6bd23cf0. Sadly this change was canceled in commit ef61cb57bd10838e90957672e6b4c129fcbe3a25 with no apparent reason. If there is no important reason for this revert, and this was just a mistake, please commit this change again.

Steps To Reproduce/Bad Parse Tree

  1. Cloned fresh tree-sitter-cpp
  2. Installed dependencies using npm
  3. Build it using tree-sitter

Expected Behavior/Parse Tree

tree-sitter-cpp should build without errors

Repro

No response

Rumi152 avatar Jun 04 '24 10:06 Rumi152