Skip to content

[>=25.02.0-edge] unable to resolve class nextflow.script.ScriptParser #5904

@rcannood

Description

@rcannood

Bug report

Hi all!

With Nextflow >= 25.02.0-edge I get the following error:

NXF_VER=25.02.0-edge \
  nextflow run czbiohub-sf/utilities \
  -r 0.1.3 \
  -main-script target/nextflow/tabula_sapiens/concat/main.nf \
  --help
 N E X T F L O W   ~  version 25.02.0-edge

Launching `https://github.com/czbiohub-sf/utilities` [big_monod] DSL2 - revision: ebc700cf69 [0.1.3]

ERROR ~ Script compilation error
- file : /home/rcannood/.nextflow/assets/czbiohub-sf/utilities/target/nextflow/tabula_sapiens/concat/main.nf
- cause: unable to resolve class nextflow.script.ScriptParser
 @ line 1419, column 1.
   import nextflow.script.ScriptParser
   ^

1 error


 -- Check '.nextflow.log' file for details

This is because nextflow.script.ScriptParser was renamed to nextflow.script.parser.v1.ScriptLoaderV1 in #4613.

Is there a way for Nextflow to be backwards compatible, e.g. by adding:

package nextflow.script

import nextflow.script.parser.v1.ScriptLoaderV1

class ScriptParser implements ScriptLoaderV1 {}

Otherwise organizations which are using production workflows on seqera cloud will end up with broken workflows when Nextflow is automatically updated to a newer version.

Thanks!
Robrecht

Expected behavior and actual behavior

With an older version of Nextflow, this error does not occur:

NXF_VER=25.01.0-edge \
  nextflow run czbiohub-sf/utilities \
  -r 0.1.3 \
  -main-script target/nextflow/tabula_sapiens/concat/main.nf \
  --help
concat 0.1.3

Inputs:
    --id
        type: string, required parameter
        example: sample
        ID of the sample.

    --input
        type: file, required parameter, file must exist
...

Instead, I get the error shown above.

Steps to reproduce the problem

See above.

Program output

See above.

Environment

  • Nextflow version: 25.01.0-edge
  • Java version: 21.0.6
  • Operating system: Fedora 40
  • Bash version: 5.2.26

Additional context

(Add any other context about the problem here)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions