nextflow-io / nextflow

A DSL for data-driven computational pipelines
http://nextflow.io
Apache License 2.0
2.7k stars 621 forks source link

[proposal] Expose ScriptParser as an extension point #4869

Open bentsherman opened 5 months ago

bentsherman commented 5 months ago

The ScriptParser class defines how a Nextflow script is executed. It essentially takes a Nextflow script and produces a Groovy class (i.e. BaseScript) which, when executed, builds the workflow DAG.

Exposing this interface as an extension point would serve a number of purposes:

Lots of potential use cases from having this extension point. But for now I mostly just want to have faster build times 😄

stevekm commented 5 months ago

would this enable the development of methods to use CWL to define Nextflow tasks? just wondering, there's a bunch of old issues related to that https://github.com/nextflow-io/nextflow/issues?q=cwl in particular this one https://github.com/nextflow-io/nextflow/issues/545

bentsherman commented 5 months ago

That is a potential use case, supporting other workflow languages like CWL and WDL. Though I would push for something that simply translates them to Nextflow rather than run them directly, so that the user has a chance to make manual refinements and it's clear what is being executed