You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... which uses Scope.rootScope() which is not guaranteed to be the same scope as the query has been compiled with.
My hunch is that Scope.loadMacros just needs to call new JsonQueryFunction with this as the closure scope, though I've yet to prove it or encode it in a unit test.
addFunction(def.name, def.args.size(), new JsonQueryFunction(def.name, def.args, JsonQuery.compile(def.body), this));
The text was updated successfully, but these errors were encountered:
When loading all macros, they are all created without specifying a Scope.
jackson-jq/jackson-jq/src/main/java/net/thisptr/jackson/jq/Scope.java
Line 211 in 0cf9166
Which is a call to:
jackson-jq/jackson-jq/src/main/java/net/thisptr/jackson/jq/internal/JsonQueryFunction.java
Lines 28 to 30 in 0cf9166
... which uses
Scope.rootScope()
which is not guaranteed to be the same scope as the query has been compiled with.My hunch is that
Scope.loadMacros
just needs to callnew JsonQueryFunction
withthis
as the closure scope, though I've yet to prove it or encode it in a unit test.The text was updated successfully, but these errors were encountered: