I'm getting 3 strict syntax warnings from unedited...
# tools
i
I'm getting 3 strict syntax warnings from unedited template files. AITA?
Copy code
Warn  subworkflows/nf-core/utils_nextflow_pipeline/main.nf:43:5: Emit name should be omitted when there is only one emit
│  43 |     dummy_emit = true
╰     |     ^^^^^^^^^^^^^^^

Warn  subworkflows/nf-core/utils_nfcore_pipeline/main.nf:20:5: Emit name should be omitted when there is only one emit
│  20 |     valid_config = valid_config
╰     |     ^^^^^^^^^^^^^^^^^^^^^^^^^

Warn  subworkflows/nf-core/utils_nfschema_plugin/main.nf:72:5: Emit name should be omitted when there is only one emit
│  72 |     dummy_emit = true
╰     |     ^^^^^^^^^^^^^^^
It's bugging me because this is all that's left to get a clean lint in #C06R4FC4C1E
m
I do not like that we are enforced to have no name when only one emit
I would rather have name enforced when only one emit actually
this 2
i
Kind of same, but that doesn't change how the linter works
m
it's just a warning
but I understand the feeling
i
Does the strict syntax tracker care about warnings?
m
No idea
i
I've checked, the main plot only checks for errors, but there is a separate one for warnings. Only a few pipelines are warning-free, presumably due to the above. By the way, is there a reason for the dummy emits to exist?
m
I honestly don't remember this one
m
The
dummy_emit = true
in
subworkflows/nf-core/utils_nextflow_pipeline/main.nf
and
subworkflows/nf-core/utils_nfschema_plugin/main.nf
date from 2024 !
Have you tried removing them altogether ?
n
Yes you can simply remove them here to prevent the error, the emit is used nowhere and was need to prevent some bug in Nextflow from a couple years ago
i
valid_config
from
UTILS_NFCORE_PIPELINE
is also not used anywhere else in the template, so it could perhaps be removed (since the
checkConfigProvided
function logs a warning if it's invalid)
I will make a PR in #CE5LG7WMB to fix this, looks like legacy code with no present-day use
🙌 1
Or rather in #CJRH30T6V
💯 1
meta.yml
claims that the role of the dummy output is to suppress an error from
nf-core subworkflows lint
(which appears to be true, the lint fails without it)
m
oh, so we still have this issue
very dumb idea
add a second dummy output
i
After way too much fighting with git branches: github.com/nf-core/modules/pull/12329
This should hopefully fix things