-
Notifications
You must be signed in to change notification settings - Fork 717
Closed
Labels
Description
Rationale
The configuration file is a key component of the Nextflow framework since it allows workflow developers to decouple the pipeline logic from the execution parameters and infrastructure deployment settings.
The current configuration mechanism is extremely flexible and powerful. It uses a customised GroovySlurper class with extended to handle multiple profiles and config file inclusions.
A Nextflow configuration file is ultimately a compiled Java class on steroids.
However, this has serious drawbacks:
- The evaluation of config file, requires Java class compilation and interpretation, which can be time-consuming compared to text file parsing.
- The evaluation of the config requires ultimately the execution of JVM code, which could be explored by malicious users and pose a non-trivial security burden to be handled in a managed environment.
- The current configuration allows the use of arbitrary imperative programming statements within a config file, which is a bad practice, making the config logic poorly readable.
- The parser implementation is becoming including hard to be maintained, and patches easily introduce unexpected side-effects, resulting in increased stability issues.
Goals
- Explore a new configuration mechanism that can be used in alternative to the current nextflow config
- Have a well-defined structure and grammar
- Human-readable
- Allow grouping correlated setting
- Allow the definition of named groups of settings (i.e. profiles)
- Allow inheritance
- Allow config files inclusion
Non-goals
- Compatible with current nextlow.config syntax
- Allowing custom functions
Action
This issue should explore possible alternative implementation and define a migration strategy.
Currently the best alternatives are:
- Hashicorp HCL: this is essentially the configuration language used by Terraform and other Hashicorp tools. It's quite popular, however there isn't a complete parsed for JVM world, other than this project.
- Ligthbed HCON: this is essentially, very curated configuration library. The syntax has a lot of similarities with the current nextflow.config syntax.
maxulysse, apeltzer, grst, 2tony2 and stevekm