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

rizin-shell-parser: Fix build with newest tree-sitter #4165

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

arrowd
Copy link
Contributor

@arrowd arrowd commented Jan 28, 2024

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the rizin book with the relevant information (if needed)

Detailed description

I was getting

../subprojects/rizin-shell-parser/src/scanner.c:4:10: error: 'tree_sitter/parser.h' file not found with <angled> include; use "quotes" instead
#include <tree_sitter/parser.h>
         ^~~~~~~~~~~~~~~~~~~~~~
         "tree_sitter/parser.h"

A bit searching revealed this: tree-sitter/tree-sitter#2677 (comment)

To answer your question, the Makefile does not install parser.h because each parser repo should use the generated parser included locally when the CLI command "tree-sitter generate" is invoked (hence why those include parser.h, to stick em in the repo)

Apparently, using angle brackets was causing /usr/include/tree-sitter/parser.h to be picked up until it stopped from being installed.

@XVilka XVilka merged commit 07f92a8 into rizinorg:dev Jan 29, 2024
106 checks passed
ajakk added a commit to ajakk/rizin that referenced this pull request Mar 4, 2024
PR rizinorg#4365 originally fixed this build failure with newer tree-sitter
versions, but the relevant change for this was partially inadvertently
reverted in rizinorg#4165.

Signed-off-by: John Helmert III <[email protected]>
@arrowd arrowd mentioned this pull request Mar 5, 2024
5 tasks
@ret2libc
Copy link
Member

ret2libc commented Mar 5, 2024

I thought I had rejected this one, I don't understand :/ maybe I mistakenly pressed the green button?!?

@ret2libc
Copy link
Member

ret2libc commented Mar 5, 2024

Ah no sorry, I was confusing this with another PR. Sorry about that.

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