Skip to content

Conversation

@ewels
Copy link
Member

@ewels ewels commented Jan 16, 2026

Moves top-level deprecation message declarations into process script blocks for strict syntax compliance.

Details

Changes

This PR fixes 15 strict syntax errors across 9 modules by moving deprecation_message variable declarations from the top level into the process script blocks where they are used.

Example fix:

// Before (top-level)
def deprecation_message = """
WARNING: This module is deprecated...
"""

process MODULE_NAME {
    script:
    log.warn(deprecation_message)
}

// After (inside process)
process MODULE_NAME {
    script:
    def deprecation_message = """
    WARNING: This module is deprecated...
    """
    log.warn(deprecation_message)
}

Why

Nextflow 25.10+ strict syntax mode requires clearer separation between declarations and statements. Variables should be declared in the scope where they are used rather than at the top level.

Affected Modules

  • bam2fastx/bam2fastq
  • custom/dumpsoftwareversions
  • custom/getchromsizes
  • deepvariant
  • fcs/fcsgx
  • kat/hist
  • pbbam/pbmerge
  • samtools/getrg
  • untarfiles

Testing

  • All changes maintain existing functionality
  • Pre-commit hooks passed
  • Ready for nextflow lint validation

This work was completed with AI assistance using Seqera AI.

ewels and others added 3 commits January 16, 2026 18:58
Move top-level deprecation_message variable declarations into process
script blocks to comply with Nextflow strict syntax requirements.

Strict syntax does not allow mixing top-level declarations with
statements. Deprecation messages are now declared inside the script
block where they are used.

Modules fixed:
- bam2fastx/bam2fastq
- custom/dumpsoftwareversions
- custom/getchromsizes
- deepvariant
- fcs/fcsgx
- kat/hist
- pbbam/pbmerge
- samtools/getrg
- untarfiles

Fixes 15 lint errors across 9 modules.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weirdly, this is running the test and seems to be succeeding to run, but failing on the snapshot.
Probably best to just change the test to process.failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants