-
Notifications
You must be signed in to change notification settings - Fork 737
Closed
Labels
Description
Spun off from #4372. Consider the following configuration:
process {
cpus = 2
memory 4.GB // incorrect
}
Omitting the =
in a config setting should lead to a syntax error, but instead it is interpreted as a command expression and usually leads to a non-sensical error:
ERROR ~ Unknown method invocation `memory` on _parse_closure5 type -- Did you mean?
memoize
-- Check '.nextflow.log' file for details
Instead it should be reported as a syntax error. This error happens often because of the different syntax for process config options and process directives.
The error is thrown from here:
nextflow/modules/nextflow/src/main/groovy/nextflow/config/ConfigParser.groovy
Lines 446 to 451 in 0bce2be
MetaMethod mm = mc.getMetaMethod(name, args) | |
if (mm) { | |
result = mm.invoke(delegate, args) | |
} else { | |
throw new MissingMethodException(name, getClass(), args) | |
} |