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

Loading of zig queries failing #108

Closed
theHamsta opened this issue Aug 27, 2021 · 6 comments
Closed

Loading of zig queries failing #108

theHamsta opened this issue Aug 27, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@theHamsta
Copy link
Member

In our CI the zig queries are currently failing (probably due to new parser). @maxxnino could you update the queries or remove them entirely?

@theHamsta theHamsta added the bug Something isn't working label Aug 27, 2021
@maxxnino
Copy link

maxxnino commented Aug 27, 2021

I will update tonight, after I get back from work. The query is working. I think because I forgot update the new c generated file, or need to update the lockfile.json

@maxxnino
Copy link

maxxnino commented Aug 27, 2021

@theHamsta i try the lastest commit nvim-treesitter/nvim-treesitter@1e4c846. The current query and parse compiled and work fine on my machine, with the commit hash lockfile.json.

  • Nvim tree sitter repo

nvim

  • Tree sitter zig repo

zig-tree

  • Query on my machine

zig-file

What should i do, The (paser + query) and The lockfile.json in two separate commit, but from 1 pull request. Is this the cause of the problem. I don't know how the CI work under the hood😕

@stsewd
Copy link
Member

stsewd commented Aug 27, 2021

@maxxnino the problem is with this query file https://github.com/nvim-treesitter/nvim-treesitter-textobjects/blob/master/queries/zig/textobjects.scm, it should be updated to use the queries from the new parser.

@maxxnino
Copy link

maxxnino commented Aug 27, 2021

phew, I thought I mess something up, I don't know how the textobject work yet. It's late now, i will look at this tomorrow morning, and will try my best to update the query

@maxxnino
Copy link

I just take a quick look at the query, I think the problem in this query

(ForTypeExpr
(SuffixExpr
(SwitchExpr) @loop.inner)) @loop.outer

Just change this to, and why not ForStatement. btw, i will test tomorrow morning

 (ForTypeExpr 
  (ErrorUnionExpr
   (SuffixExpr  
     (SwitchExpr) @loop.inner))) @loop.outer 

@theHamsta
Copy link
Member Author

Has been fixed by @maxxnino

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants