Skip to content

Conversation

@ewels
Copy link
Member

@ewels ewels commented Jan 16, 2026

Wraps environment variable references in env() function for strict syntax compliance.

Details

Changes

This PR fixes 58 strict syntax errors across 30 files by wrapping environment variable references in the env() function, as required by Nextflow 25.10+ strict syntax mode.

Example fix:

// Before
${SENTIEON_LICSRVR_IP}

// After
${env('SENTIEON_LICSRVR_IP')}

Why

Nextflow 25.10 introduces strict syntax mode (enabled via export NXF_SYNTAX_PARSER=v2) which will become mandatory in future versions. In strict mode, environment variables must be accessed explicitly using the env() function rather than directly by name.

Affected Files

  • Sentieon modules (30 files)
  • Spotiflow test configs

Testing

  • All changes maintain backward compatibility with non-strict mode
  • Pre-commit hooks passed (prettier, whitespace checks)
  • Ready for nextflow lint validation

This work was completed with AI assistance using Seqera AI.

Wrap environment variables in env() function to comply with Nextflow
strict syntax mode (NXF_SYNTAX_PARSER=v2). This addresses 58 lint errors
across Sentieon and Spotiflow module test configs.

Changes:
- Sentieon modules: Replace ${SENTIEON_LICSRVR_IP} with ${env('SENTIEON_LICSRVR_IP')}
- Sentieon modules: Replace ${SENTIEON_AUTH_MECH} with ${env('SENTIEON_AUTH_MECH')}
- Spotiflow module: Replace ${HOME} with ${env('HOME')}

This is part of the migration to Nextflow strict syntax where implicit
environment variable references are not allowed.

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Copy link
Contributor

@mashehu mashehu left a comment

Choose a reason for hiding this comment

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

I guess there should also be several $TMPDIR with the same problem

@ewels
Copy link
Member Author

ewels commented Jan 17, 2026

Ok, it looks like env() is not backwards compatible to the old language parser, so I can't make this change without breaking backwards compatibility (which I've been trying to avoid with the strict syntax fixes).

I'll use the old-style System.getenv() instead of env() for now and drop in some comments that when we bump the minimum Nextflow version to 26.04.0 where strict syntax is on by default (eg. by updating to the new process input syntax) , that they should be updated.

@ewels
Copy link
Member Author

ewels commented Jan 17, 2026

@maxulysse @FriederikeHanssen I was assuming that the tests were failing because of something I did, but is it possible that the Senteion tests are failing because of an unrelated error? It's to do with fetching the licence file.

@ewels ewels added the WIP Work in progress label Jan 17, 2026
@ewels ewels marked this pull request as draft January 17, 2026 22:11
@maxulysse
Copy link
Member

@maxulysse @FriederikeHanssen I was assuming that the tests were failing because of something I did, but is it possible that the Senteion tests are failing because of an unrelated error? It's to do with fetching the licence file.

@edmundmiller ?

@SPPearce
Copy link
Contributor

Sentieon tests only run when ran from the nf-core organisation, so you need to make the branch there, not your own fork.

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

Labels

WIP Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants