OpenFn / kit

The bits & pieces that make OpenFn work. (diagrammer, cli, compiler, runtime, runtime manager, logger, etc.)
8 stars 12 forks source link

compiler: maybe make AST visitors run in sequence #638

Closed josephjclark closed 2 months ago

josephjclark commented 3 months ago

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:

I prefer that second approach - it's a better compromise.