Open mpadge opened 1 month ago
Writing that last statement made me realise it's just the treesitter
function not capturing the calling environment. That makes fixing it easy for me. Your choices are:
(1) Just ignore this and close for now; or
(2) Ensure that the calling env is sufficiently enclosed in the x
param expected by the query functions.
It's probably not overly important, so okay for you to just close. Thanks anyway :+1:
Hi Davis, thanks so much for your help thus far! I've encountered an issue which you can hopefully reproduce via simple demo repo at https://github.com/mpadge/r-tree-sitter-test. The README there has all info. As a local reprex here, based on a random CRAN tarball:
But then everything works if the full namespace of that package is loaded:
Created on 2024-10-02 with reprex v2.1.1
The only function it's calling is this:
I guess there's something happening here with tracking and resetting the node pointers? I'd really appreciate any insight you could give; thanks!
Oh, and this behaviour is only seen when the function is embedded within a package namespace, hence my construction of test repo to demonstrate. You won't see the same if you try to locally step through
r-tree-sitter
code. Everything works then too, which makes it quite tricky to debug.