SwiftTreeSitter icon indicating copy to clipboard operation
SwiftTreeSitter copied to clipboard

Unable to use SwiftTreeSitter with Swift C++ interop enabled projects

Open MattGuerrette opened this issue 1 year ago • 3 comments

See: https://github.com/tree-sitter/tree-sitter/pull/3534

Due to a linkage issue in tree-sitter, SwiftTreeSitter cannot be used in projects that enable C++ interop. Once that PR is accepted, SwiftTreeSitter would need to be updated to the latest tree-sitter, or port that change to a version suitable for this project.

MattGuerrette avatar Aug 18 '24 03:08 MattGuerrette

Huh, interesting problem. Updating shouldn't be a issue. Thanks for letting me know!

mattmassicotte avatar Aug 18 '24 10:08 mattmassicotte

It also looks like since tree-sitter version 0.21.0 swift cannot represent TSLanguage anymore so it has to become an OpaquePointer rather than a typed one.

thecoolwinter avatar Sep 03 '24 18:09 thecoolwinter

https://github.com/ChimeHQ/SwiftTreeSitter/commit/42ee1b361fec95aadd31359db68f9fbf21b1e9a2

The TSLanguage change was slightly annoying, but wasn't too hard to fix.

@MattGuerrette do things on main now look ok for you?

mattmassicotte avatar Sep 11 '24 10:09 mattmassicotte