Conversation
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
|
Research updates:
|
|
Here's an example to illustrate how the config parser "executes" the config file. Given this config: foo.bar = 'hello'
foo {
bar = 'hello'
}
includeConfig 'foobar.config'The parser transforms this code into the following: assign(['foo', 'bar'], 'hello')
block('foo', {
assign(['bar'], 'hello')
}
includeConfig('foobar.config')Basically each statement is translated to a DSL method (see I think this is a good model for how we might separate the Nextflow language from the runtime. Instead of hooking directly into Groovy methods and relying on Groovy MOP, metaclass, etc, we can introduce a hidden DSL which allows us to better control how a given statement (e.g. invoking a process in a workflow) is executed by the runtime. |
|
Java security manager is being removed. I will keep an eye out for other sandboxing techniques, but in the meantime, a simple solution is to provide a "safe" execution mode where assignment expressions are wrapped in string literals. |
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
|
Really like the way that this is going, great work 👏🏻 |
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
|
|
||
| } | ||
|
|
||
| def 'should apply profiles in the order they were defined' () { |
There was a problem hiding this comment.
@pditommaso this test is related to #1792 . We determined that config profiles are applied this way with the legacy parser. We could patch it, but I figure there's no point now, so just added a test to verify it's behavior.
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
|
@pditommaso tests are passing, let's review and merge |
modules/nextflow/src/main/groovy/nextflow/config/ConfigParserFactory.groovy
Show resolved
Hide resolved
modules/nextflow/src/main/groovy/nextflow/config/parser/ConfigToGroovyVisitor.java
Show resolved
Hide resolved
modules/nextflow/src/main/groovy/nextflow/config/parser/legacy/ConfigBase.groovy
Outdated
Show resolved
Hide resolved
modules/nextflow/src/main/groovy/nextflow/config/parser/legacy/ConfigParserLegacy.groovy
Show resolved
Hide resolved
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
christopher-hakkaart
left a comment
There was a problem hiding this comment.
One minor suggestion but otherwise the docs look great.
Co-authored-by: Chris Hakkaart <chris.hakkaart@seqera.io> Signed-off-by: Ben Sherman <bentshermann@gmail.com>
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Close #2723
Implements the strict config syntax in Nextflow, using the shared "compiler" module from the language server.
To use the strict config syntax, simply set
NXF_SYNTAX_PARSER=v2in your environment when runningnextflow.This config loader is much simpler and easier to read. There is no more dependence on metaclasses, instead there is a simple builder DSL for executing a config file and producing a map.
NOTE: While this PR uses Jitpack to load the shared module, this dependency should be inverted before the release of 25.04. That is, eventually the compiler module should reside in Nextflow and the language server should consume it.