Cannot patch subworkflows if you include a function in it
Open
Nobody has claimed this yet.
bug
- Dominant language
- Python
- Stars
- 322
- Forks
- 255
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 5
Description
Description of the bug
If you have a function stored in a Nextflow file:
functions/main.nf:
def helloWorld() {
println "Hello world!"
}
And then add this function to an existing nf-core subworkflow:
include { helloWorld } from 'functions/main.nf'
workflow TEST {
...
helloWorld()
}
then nf-core modules patch fails as it tries to parse configs:
~/P/genomeassembly index_files• ❱ nf-core subworkflows --git-remote https://github.com/sanger-tol/nf-core-modules.git patch cram_map_illumina_hic (nextflow)
,--./,-.
___ __ __ __ ___ /,-._.--~\
|\ | |__ __ / ` / \ |__) |__ } {
| \| | \__, \__/ | \ |___ \`-._,-`-,
`._,._,'
nf-core/tools version 3.5.2 - https://nf-co.re
ERROR 'helloWorld'
Command used and terminal output
(here the function being included is called `deepClone()`) - verbose output: https://pastebin.com/tVd1Dm5E
System information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the nf-core subworkflows ... patch entry point and reproduce the failure using an included Nextflow function such as helloWorld() or deepClone(). Trace the config-parsing path that raises the function name error; done means patching the existing subworkflow succeeds when it includes and calls a function.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100