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

Multiple Definitions of "scan", "deserialize", and "serialize" when linked with tree-sitter-php #63

Closed
esheri3 opened this issue Jul 9, 2023 · 4 comments · Fixed by #64

Comments

@esheri3
Copy link

esheri3 commented Jul 9, 2023

I am working on a project that links multiple tree-sitter grammar libraries together (ex: tree-sitter-go, tree-sitter-json, ...). Recently, I received "multiple definitions of" errors for "scan", "deserialize", and "serialize" between tree-sitter-html and tree-sitter-php.

Ex:

tree-sitter-php/src/scanner.c:438: multiple definition of `scan'
tree-sitter-html/src/scanner.c:370: first defined here

Are you open to renaming your symbols to have a namespace-like prefix, perhaps something like "tree_sitter_html_scan"? I don't think there's anything I can do on my end short of forking and patching the tree-sitter-html codebase.

Thanks in advance for the consideration!

@esheri3
Copy link
Author

esheri3 commented Jul 9, 2023

@amaanq I believe the issue was introduced here when migrating from C++ to C: 3af1bfd

@amaanq
Copy link
Member

amaanq commented Jul 9, 2023

Yeah I PRed fixes to bash and php, I'll add one for this

@esheri3
Copy link
Author

esheri3 commented Jul 9, 2023 via email

@esheri3
Copy link
Author

esheri3 commented Jul 10, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants