nextflow-io / nextflow-io/nextflow

Strict syntax raises false warning in module templates

Open
#6,777 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

lang/processes stale
Dominant language
Groovy
Stars
3.5k
Forks
811
Avg merge
2d 11h
Merged PRs (30d)
61

Description

Bug report

Module templates give Variable was declared but not used warnings when using the new strict syntax, when the variable is in fact used by the template script.

Expected behavior and actual behavior

Variables used in the template script should not raise this warning.

Steps to reproduce the problem

An example at nf-core: https://github.com/nf-core/scdownstream/blob/dev/modules/local/scvitools/scvi: the script section in main.nf contains several variables used in the templates/scvi.py script.

Environment
  • Nextflow version: 25.10.3.10983
  • Java version: 21.0.9
  • Operating system: macOS
  • Bash version: 5.3.9(1)-release

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the warning with the linked nf-core example, then compare the script section in main.nf with the variables used in templates/scvi.py. Trace how strict syntax checks template variables; done means variables used by the template script no longer produce false unused-variable warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.