nf-core / nf-core/modules

utils_nfcore_pipeline: Positional args warning is misleading

Open
#9,573 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Nextflow
Stars
429
Forks
1.1k
Avg merge
1d 6h
Merged PRs (30d)
153

Description

Description of the bug

The new-ish positional args warning in nf-core pipelines has some misleading behaviour in at least one edge-case.

Using -stub-run/-stub will produce the following:

  WARN: nf-core pipelines do not accept positional arguments. The positional argument `true` has been detected.
        Hint: A common mistake is to provide multiple values to `-profile` separated by spaces. Please use commas to separate profiles instead,e.g., `-profile docker,test`.

It seems that nextflow sets -stub to have a value of "true" when it normalises args which for whatever reason is later treated as an unattached positional arg?

This might be both an nf-core issue in that the check is rathe blunt, but also a nextflow issue because it seems weird to inject a normalised arg value into the positional args?

Command used and terminal output

No response

System information

nextflow 23.10.1

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 -stub-run or -stub using Nextflow 23.10.1, then inspect the linked nextflow/src/main/groovy/nextflow/cli/Launcher.groovy normalization around lines 295-297 and the nf-core positional-argument check. Done means the normalized true value is no longer reported as an unattached positional argument, with the intended warning behavior verified.

Written by the indexing model from the issue text.

Assessment

Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.