After upgrading <#C02FC6VFQG1> to nf-schema 2.7.2 ...
# nf-schema
d
After upgrading #C02FC6VFQG1 to nf-schema 2.7.2 I get this error:
Copy code
ERROR ~ Argument of `file()` function cannot be empty

 -- Check script 'subworkflows/nf-core/utils_nfschema_plugin/main.nf' at line: 72 or see '.nextflow.log' file for more details
Line 72 is the call to
validateParams
in:
Copy code
if(validate_params) {
        validateOptions = [:]
        if(parameters_schema) {
            validateOptions << [parametersSchema: parameters_schema]
        }
        if(cli_typecast != null) {
            validateOptions << [cliTypecast: cli_typecast]
        }
        validateParameters(validateOptions)
    }
I call the utility function like this from the local subworkflow:
Copy code
UTILS_NFSCHEMA_PLUGIN (
        workflow,
        validate_params,
        null,
        help,
        help_full,
        show_hidden,
        before_text,
        after_text,
        command,
        null
    )
I.e. with
null
for
parameters_schema
. A couple of
println
shows that neither of the two `if`s are visited, and
validateOptions
is
[:]
when the function is called. Running the pipeline with
--help
works. Tools version 4.0.2, fails both with Nextflow 26.4.03 and 25.10.4. Doing the same with #C01U1E95JQ5 just works. I can't find any differences between the two.
Here's the
.nextflow.log
Solved (with Claude). It turned out that I didn't have null defaults for file parameters in the schema and that I had set the defaults for file params in
nextflow.config
to the empty string rather than
null
.