Skip to content
Discussion options

You must be logged in to vote

Confirmed - this is a regression. Opened #2271 with a fix.

Root cause: the vm2 bump (3.10.2 → 3.11.3) in #2168 changed how V8 CallSite objects behave inside the sandbox: they no longer carry file paths. The CLI has a global.__dataform_current_file fallback for exactly this case, but it's set/reset per module load - by the time a sqlx action's callback runs (during Session.compile), that global has been restored to the sandbox entry (index.js). So every ref()/Session.resolve failure got attributed to index.js instead of the calling .sqlx file.

Fix: track the current action's file on the Session while its callback is compiled, and use it in compileError() when no explicit path was passed. N…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@rafal-hawrylak
Comment options

@rafal-hawrylak
Comment options

Answer selected by sb335c
@rafal-hawrylak
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants