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

[BUG] Can't install treesitter parsers on 0.5 #109

Closed
3 tasks done
beauwilliams opened this issue Sep 16, 2021 · 2 comments
Closed
3 tasks done

[BUG] Can't install treesitter parsers on 0.5 #109

beauwilliams opened this issue Sep 16, 2021 · 2 comments
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.

Comments

@beauwilliams
Copy link

Contributions

Plugin Version

  • I am using the latest version of the plugin

Neovim Version

  • I am using either 0.5 stable or the latest compiled 0.6 version

Neovim Version

0.5, Treesitter branch = 0.5 compat

Log Output

Empty..

Branch

master

Loaded modules

It's an issue with treesitter

Expected behavior

It works normally. In the past this configuration worked. I have not used this plugins for a month or so, was working fine last time. So there has been a breaking change recently.

Actual behavior

Running :TSUpdate give the following errors

❯ gcl
nvim-treesitter[norg]: Error during compilation
src/scanner.cc:94:39: error: expected expression
return std::vector({ lhs, static_cast(rhs) });
^
src/scanner.cc:97:27: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
std::vector&& operator|(std::vector&& lhs, TokenType rhs)
^
src/scanner.cc:97:62: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
std::vector&& operator|(std::vector&& lhs, TokenType rhs)
^
src/scanner.cc:100:16: error: rvalue reference to type 'vector<...>' cannot bind to lvalue of type 'vector<...>'
return std::move(lhs);
^~~~~~~~~~~~~~
src/scanner.cc:315:41: error: expected ';' at end of declaration list
std::vector<size_t>& get_tag_stack() noexcept { return m_TagStack; }
^
;
src/scanner.cc:551:27: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
TokenType m_LastToken = NONE;
^
src/scanner.cc:554:26: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
size_t m_ParsedChars = 0, m_IndentationLevel = 0;
^
src/scanner.cc:554:50: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
size_t m_ParsedChars = 0, m_IndentationLevel = 0;
^
src/scanner.cc:560:54: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
const std::array<int32_t, 6> s_DetachedModifiers = { '*', '-', '>', '|', '=', '~' };
^
src/scanner.cc:118:13: error: use of undeclared identifier 'advance'
advance(lexer);
^
src/scanner.cc:131:13: error: use of undeclared identifier 'advance'
advance(lexer);
^
src/scanner.cc:141:17: error: use of undeclared identifier 'advance'
advance(lexer);
^
src/scanner.cc:148:21: error: use of undeclared identifier 'advance'
advance(lexer);
^
src/scanner.cc:162:13: error: use of undeclared identifier 'advance'
advance(lexer);
^
src/scanner.cc:167:48: error: use of undeclared identifier 'm_Current'
if (lexer->lookahead == ']' && m_Current != '\')
^
src/scanner.cc:169:21: error: use of undeclared identifier 'advance'
advance(lexer);
^
src/scanner.cc:177:17: error: use of undeclared identifier 'advance'
advance(lexer);
^
src/scanner.cc:184:20: error: use of undeclared identifier 'check_link'
return check_link(lexer);
^
src/scanner.cc:188:13: error: use of undeclared identifier 'advance'
advance(lexer);
^

Potentially conflicting plugins

No response

Other information

No response

Help

No response

Implementation help

No response

@beauwilliams beauwilliams added the bug Issues related to bugs. Please attach a severity, a priority and category with this label. label Sep 16, 2021
@vhyrro
Copy link
Member

vhyrro commented Sep 16, 2021

Hey man! Those errors seem to be because of compiler versioning. Are you by any chance running on a mac? Macs are known to have old C++ standards and therefore have problems with compilation. If you are then you might wanna check out the workaround here. The nvim-treesitter guys are trying to figure out that problem so we'll have to resort to workarounds in the meantime unfortunately. On the off chance that you're not on a mac make sure that you're 100% running the latest clang/gcc version that your system allows.

If something still breaks then lemme know :)

@danymat
Copy link
Member

danymat commented Sep 21, 2021

I will close this issue because the workaround should be working for Mac users. Feel free to reopen the issue if the bug persists.

@danymat danymat closed this as completed Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.
Projects
None yet
Development

No branches or pull requests

3 participants