OpenFn / core

The central job processing module used in OpenFn v1.
https://www.openfn.org/
GNU General Public License v3.0
18 stars 8 forks source link

Use compiler in execute command #2

Closed stuartc closed 8 years ago

stuartc commented 8 years ago

Currently the execute command on Diesl does not use the compiler. The command is also only used during development flows, and so has been safely ignored for now.

Execute is extremely useful as it has no static dependency tracking - sacrificing safety for ease of use.

There appears to be a happy middle ground, by dropping doclets from the compile step. We can achieve a similar level of safety by introspecting the language pack module for exports during compile, and then detect call expressions in the user expression using the scope lookup facility in ast-types and esprima.

The compile step has become a little cumbersome to work with, and efforts to align execute and compile will go a long way in bringing developing and testing expressions and language packs closer to how production executes them.