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
At the moment, the compiler will walk the job AST once, and call out to each transformer function as it walks the tree.
This sort of means that all the visitors run at the same time. There's no sequencing.
That's been fine up until now. But the experiment lazy-state transformer give us a problem. Technically, it needs to replace the $ references before import statements are generated - otherwise the $ (which is an unused variable) will be imported from the adaptor.
Solutions:
Run each transformer once, in order, in its own parse of the tree, and pass the tree downstream. This means parsing the AST like 4 times (becasue we have 4 transformers right now)
Add an order to the transformer, and for each order key, build a single visitor. This introduces multiple passes of the AST, but not one per transformer
I prefer that second approach - it's a better compromise.
The text was updated successfully, but these errors were encountered:
At the moment, the compiler will walk the job AST once, and call out to each transformer function as it walks the tree.
This sort of means that all the visitors run at the same time. There's no sequencing.
That's been fine up until now. But the experiment lazy-state transformer give us a problem. Technically, it needs to replace the
$
references before import statements are generated - otherwise the$
(which is an unused variable) will be imported from the adaptor.Solutions:
order
to the transformer, and for each order key, build a single visitor. This introduces multiple passes of the AST, but not one per transformerI prefer that second approach - it's a better compromise.
The text was updated successfully, but these errors were encountered: