From e53002868182874cbbf2624f7dd3007c49a29564 Mon Sep 17 00:00:00 2001 From: Matt Fysh Date: Mon, 9 Sep 2024 13:59:01 +1000 Subject: [PATCH 1/2] fix subquery context switching --- packages/parser/desugar/inference/typeinfo.ts | 152 +++++++++--------- packages/parser/desugar/trace.ts | 9 +- test/request.spec.ts | 14 ++ 3 files changed, 94 insertions(+), 81 deletions(-) diff --git a/packages/parser/desugar/inference/typeinfo.ts b/packages/parser/desugar/inference/typeinfo.ts index 26ab9c3..af80caf 100644 --- a/packages/parser/desugar/inference/typeinfo.ts +++ b/packages/parser/desugar/inference/typeinfo.ts @@ -10,8 +10,13 @@ import type { TransformVisitor, Visit } from '../../visitor/transform.js' import { traceVisitor } from '../trace.js' import { render, selectTypeInfo } from '../utils.js' -function clone(a: unknown) { - return JSON.parse(JSON.stringify(a)) +const modTypeMap: Record = { + html: { type: Type.Html }, + json: { type: Type.Value }, + js: { type: Type.Js }, + headers: { type: Type.Headers }, + cookies: { type: Type.Cookies }, + link: { type: Type.Value }, } function unwrap(typeInfo: TypeInfo) { @@ -25,6 +30,26 @@ function unwrap(typeInfo: TypeInfo) { } } +function rewrap( + typeInfo: TypeInfo | undefined, + itemTypeInfo: TypeInfo, + optional: boolean, +): TypeInfo { + switch (typeInfo?.type) { + case Type.List: + return { ...typeInfo, of: rewrap(typeInfo.of, itemTypeInfo, optional) } + case Type.Maybe: { + const option = rewrap(typeInfo.option, itemTypeInfo, optional) + if (option.type === Type.Maybe || !optional) { + return option + } + return { ...typeInfo, option } + } + default: + return structuredClone(itemTypeInfo) + } +} + export function inferTypeInfo(): TransformVisitor { const scope = new RootScope() @@ -37,41 +62,25 @@ export function inferTypeInfo(): TransformVisitor { return ret } - function rewrap( - typeInfo: TypeInfo | undefined, - itemTypeInfo: TypeInfo, - ): TypeInfo { - switch (typeInfo?.type) { - case Type.List: - return { ...typeInfo, of: rewrap(typeInfo.of, itemTypeInfo) } - case Type.Maybe: { - const option = rewrap(typeInfo.option, itemTypeInfo) - if (option.type === Type.Maybe || !optional) { - return option - } - return { ...typeInfo, option } + function ctx(cb: (tnode: C, ivisit: Visit) => C) { + return function enter(node: C, visit: Visit): C { + if (!node.context) return cb(node, visit) + const context = visit(node.context) + const itemContext: any = { + ...context, + typeInfo: unwrap(context.typeInfo), } - default: - return clone(itemTypeInfo) - } - } - function itemVisit(node: CExpr, visit: Visit): Visit { - return child => { - if (child === node.context || !scope.context?.typeInfo) { - return visit(child) - } - scope.pushContext({ - ...scope.context, - typeInfo: unwrap(scope.context.typeInfo), - }) - const xnode = setOptional(false, () => visit(child)) - scope.popContext() - return xnode + const ivisit: Visit = child => + child === itemContext ? itemContext : visit(child) + + const xnode = cb({ ...node, context: itemContext }, ivisit) + + const typeInfo = rewrap(context.typeInfo, xnode.typeInfo, optional) + return { ...xnode, context, typeInfo } } } - // SliceExpr and ModuleCallExpr use default Type.Value const trace = traceVisitor(scope) return { @@ -102,8 +111,7 @@ export function inferTypeInfo(): TransformVisitor { const id = node.value.value const value = scope.vars[id] invariant(value, new ValueReferenceError(node.value.value)) - const { typeInfo } = value - return { ...node, typeInfo: clone(typeInfo) } + return { ...node, typeInfo: structuredClone(value.typeInfo) } }, RequestExpr(node) { @@ -122,17 +130,17 @@ export function inferTypeInfo(): TransformVisitor { }, SliceExpr: { - enter(node, visit) { - const xnode = trace.SliceExpr.enter(node, itemVisit(node, visit)) + enter: ctx((node, visit) => { + const xnode = trace.SliceExpr.enter(node, visit) let typeInfo: TypeInfo = { type: Type.Value } if (optional) typeInfo = { type: Type.Maybe, option: typeInfo } - return { ...xnode, typeInfo: rewrap(xnode.context?.typeInfo, typeInfo) } - }, + return { ...xnode, typeInfo } + }), }, SelectorExpr: { - enter(node, visit) { - const xnode = trace.SelectorExpr.enter(node, itemVisit(node, visit)) + enter: ctx((node, visit) => { + const xnode = trace.SelectorExpr.enter(node, visit) let typeInfo: TypeInfo = unwrap( xnode.context?.typeInfo ?? { type: Type.Value }, ) @@ -153,52 +161,42 @@ export function inferTypeInfo(): TransformVisitor { } else if (optional) { typeInfo = { type: Type.Maybe, option: typeInfo } } - return { ...xnode, typeInfo: rewrap(xnode.context?.typeInfo, typeInfo) } - }, + + return { ...xnode, typeInfo } + }), }, ModifierExpr: { - enter(node, visit) { - const modTypeMap: Record = { - html: { type: Type.Html }, - json: { type: Type.Value }, - js: { type: Type.Js }, - headers: { type: Type.Headers }, - cookies: { type: Type.Cookies }, - link: { type: Type.Value }, - } - const xnode = trace.ModifierExpr.enter(node, itemVisit(node, visit)) + enter: ctx((node, visit) => { + const xnode = trace.ModifierExpr.enter(node, visit) const mod = xnode.value.value const typeInfo = modTypeMap[mod] invariant(typeInfo, new QuerySyntaxError(`Unknown modifier: ${mod}`)) - return { ...xnode, typeInfo: rewrap(xnode.context?.typeInfo, typeInfo) } - }, + return { ...xnode, typeInfo } + }), }, SubqueryExpr: { - enter(node, visit) { - const xnode = trace.SubqueryExpr.enter(node, itemVisit(node, visit)) + enter: ctx((node, visit) => { + const xnode = trace.SubqueryExpr.enter(node, visit) const typeInfo = xnode.body.find( stmt => stmt.kind === NodeKind.ExtractStmt, )?.value.typeInfo ?? { type: Type.Never } - return { ...xnode, typeInfo: rewrap(xnode.context?.typeInfo, typeInfo) } - }, + return { ...xnode, typeInfo } + }), }, ObjectLiteralExpr: { - enter(node, visit) { - const xnode = trace.ObjectLiteralExpr.enter( - node, - itemVisit(node, child => { - if (child === node.context) return visit(child) - const entry = node.entries.find(e => e.value === child) - invariant( - entry, - new QuerySyntaxError('Object entry missing typeinfo'), - ) - return setOptional(entry.optional, () => visit(child)) - }), - ) + enter: ctx((node, visit) => { + const xnode = trace.ObjectLiteralExpr.enter(node, child => { + if (child === node.context) return visit(child) + const entry = node.entries.find(e => e.value === child) + invariant( + entry, + new QuerySyntaxError('Object entry missing typeinfo'), + ) + return setOptional(entry.optional, () => visit(child)) + }) const typeInfo: TypeInfo = { type: Type.Struct, @@ -215,16 +213,16 @@ export function inferTypeInfo(): TransformVisitor { ), } - return { ...xnode, typeInfo: rewrap(xnode.context?.typeInfo, typeInfo) } - }, + return { ...xnode, typeInfo } + }), }, ModuleCallExpr: { - enter(node, visit) { - const xnode = trace.ModuleCallExpr.enter(node, itemVisit(node, visit)) + enter: ctx((node, visit) => { + const xnode = trace.ModuleCallExpr.enter(node, visit) const typeInfo: TypeInfo = { type: Type.Value } - return { ...xnode, typeInfo: rewrap(xnode.context?.typeInfo, typeInfo) } - }, + return { ...xnode, typeInfo } + }), }, } } diff --git a/packages/parser/desugar/trace.ts b/packages/parser/desugar/trace.ts index 86f236e..ea44a3e 100644 --- a/packages/parser/desugar/trace.ts +++ b/packages/parser/desugar/trace.ts @@ -5,10 +5,11 @@ import type { TransformVisitor, Visit } from '../visitor/transform.js' export function traceVisitor(scope: RootScope) { function ctx(node: C, visit: Visit, cb: (tnode: C) => C) { - const context = node.context && visit(node.context) - context && scope.pushContext(context) + if (!node.context) return cb(node) + const context = visit(node.context) + scope.pushContext(context) const xnode = cb({ ...node, context }) - context && scope.popContext() + scope.popContext() return xnode } @@ -84,7 +85,7 @@ export function traceVisitor(scope: RootScope) { SliceExpr: { enter(node, visit) { - // contains no additional expressions beyond .context + // contains no additional expressions (only .context) return ctx(node, visit, node => node) }, }, diff --git a/test/request.spec.ts b/test/request.spec.ts index b86fe41..e756750 100644 --- a/test/request.spec.ts +++ b/test/request.spec.ts @@ -279,6 +279,20 @@ describe('request', () => { `) expect(result).toEqual({ whicha: 1, whichb: 2 }) }) + + it('updates subquery context', async () => { + const result = await execute(` + set x? = \`'

'\` -> @html -> ( + GET http://example.com + + extract h1 + ) + + extract $x + `) + + expect(result).toEqual('test') + }) }) describe('inference', () => { From 1c17b8dc6a2f417fb7948d35531b8eb970f345cc Mon Sep 17 00:00:00 2001 From: Matt Fysh Date: Mon, 9 Sep 2024 13:59:37 +1000 Subject: [PATCH 2/2] upgrade deps --- .changeset/witty-wolves-know.md | 5 +++++ bun.lockb | Bin 84456 -> 78320 bytes package.json | 15 +++++++++------ 3 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 .changeset/witty-wolves-know.md diff --git a/.changeset/witty-wolves-know.md b/.changeset/witty-wolves-know.md new file mode 100644 index 0000000..ecbc5f4 --- /dev/null +++ b/.changeset/witty-wolves-know.md @@ -0,0 +1,5 @@ +--- +"@getlang/parser": patch +--- + +bugfix: subquery context switching diff --git a/bun.lockb b/bun.lockb index 980572ecb2971c42df4faf93789945aeb41fe020..3067d35d15155712f8b1af493d254bbbdf11a2ff 100755 GIT binary patch delta 14547 zcmeHucU)9Q*Z^+KI zQIRABTVhPH#+q1S#ZD~m_uRWHzR&N;@BNj3pZoE9&wQtxIdkUB+{@kZE|)#IWxmkc zBcplA~? zkPVG8OPigO=#`#hVdQVkcnjt}_?eklt+SOxQV-Ql#c|o%_{1EEZLQqaNq~v%dr)9=TCO`@4+0EB5yAUcOV=5rYLIrLOAwAHFMsf?ilg!m- zY2(roCHGNI+Ai{^thsK3LezBvwd|0a<(00bfd@bZY2mn`iheevU_)|7W_BWMhM{ER zTGS<5D$xaTOE{C{V&qf%b})^&D12666!lNlYJ`m@Sbsg(4dETMU2*PnF|XW7LO zdigu4n=Z*oY)O+F2U~N}v^nIGgp_Py!UsBw7TiER(kz;utvv!wP^wQ#$w=_Z%aZWs zV)<;NgbOm`wYiC=7~Wy*`J{^&F{{xS)8(oET1@D(vJ-Q2QxdaB<)v#gyiyX374&+P zL#IBApEI}9{oO)bGQE(CfBHz=$YI_sMKi}hVp8-!L6XC2&L;@G<+d)$MCXf_L@7qcw%^?4P zRACp zeXRoQ-FLj)roUIVtbR)~8SK(C&Yacq)!68Je`JrrqCc`wsYKHABbx)(<0Cr{R#&q* zcAajfGQ|`yKQI|4#F_gwXv?!2Sh0TmpiKlT=5KJn#6ucIFi)P3`(S<$_d@;#_p3a_ zHbQP^A(3=IdpWOYq?Y#q3kEYMd)XZR1~n>?*HP@xRxSNt!3!FP%Rjf2NHBw_NX;gI zQ8OuLwrX~ihct;`k9j`sJ^8^V5%RfK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9KTebo|Q_ZkcIm+1^E;EI8K&;u9|Fi%B;=4ybN&T9Lmg*SM&mB^TN-Y6$(i2+4G= zJ{F~u(`pOc@HDt*yeYSZ3;fFlQRy%9+~|eb%a67B)WBT(Y)d^7{=EgamPHyp&bjC^ z3}!X&?TQ9la>I(&8gcO?GUI%UYFv>GsV%(8ra^JK-JoQsU*+>oM7YtFxDfCXo;w6H&4jhlrtsov*_g6&jsFTC^}c+*w$7syhEssfD2@ Q9k9UFFRbV{Pww6S0N~o2bpQYW diff --git a/package.json b/package.json index afadf09..64c0646 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "get", "license": "Apache-2.0", "private": true, - "packageManager": "bun@1.1.22", + "packageManager": "bun@1.1.27", "scripts": { "format": "biome check --write", "lint": "bun lint:check && bun lint:types && bun lint:unused && bun lint:repo", @@ -20,10 +20,10 @@ "devDependencies": { "@biomejs/biome": "1.8.2", "@changesets/changelog-github": "^0.5.0", - "@changesets/cli": "^2.27.7", - "@types/bun": "^1.1.6", - "knip": "^5.27.2", - "sherif": "^0.10.0", + "@changesets/cli": "^2.27.8", + "@types/bun": "^1.1.8", + "knip": "^5.30.0", + "sherif": "^1.0.0", "typescript": "^5.5.4" }, "knip": { @@ -36,7 +36,10 @@ ], "workspaces": { "packages/parser": { - "entry": ["index.ts", "grammar.ts"] + "entry": [ + "index.ts", + "grammar.ts" + ] } } }