Wrap-up
Target time: 5 minutes (or come back to this page when migrating real code).
This page is built for two moments: the end of the workshop, and every later moment when you are looking at a real-world Nextflow file and need to remember which part of the workshop covered that exact error message.
Migration checklist
Use this checklist when migrating real workflows. The order mirrors the recommended migration sequence.
- Run
nextflow lint -project-dir . main.nfbefore running the workflow. Fix the first parser error that appears. - Re-run lint to surface deprecation warnings that were hidden behind the parser error.
- Sweep the silent tier by hand (typed declarations like
String x,Integer count) — lint will not warn you. - In scripts: replace
import,class,for/while,++/--,switch, spread*, and assignment-in-call. Use lowercasechanneland explicit closure parameters. - In modules: remove
addParams/paramsclauses frominclude. Expose runtime knobs throughtake:on a named sub-workflow. Stop readingparams.*from inside processes. - In processes: replace
shell:withscript:, quoteenv 'NAME', escape shell variables with\$inside double-quoted bodies, interpolate output paths so multi-record channels do not collide. - In config: move free
defvariables toparams, replace helper functions andswitchwith immediately-invoked closures, useSystem.getenv('USER') ?: 'user'instead of bare${USER}, list helper params invalidation.ignoreParams. - Treat static typing, records, topic channels, workflow outputs, and
nextflow moduleas optional modernization after the strict-syntax migration is stable. - Re-run lint, the smoke profile, and
nf-testbefore opening the PR.
Reverse index: which part fixes which message
Find the message you are seeing, jump to that part.
| What lint or the runtime tells you | Where it was covered |
|---|---|
Error: Unexpected input: '=' (assignment expression inside a call) |
Part 1 and Part 2 |
Error: Groovy 'import' declarations are not supported |
Part 2 |
Error: 'class' is not allowed as an identifier |
Part 2 |
Error: 'for' loops are no longer supported / while errors |
Part 2 |
Error: Unexpected input: '++' / '--' |
Part 2 |
Error: Unexpected input: ':' near case (a switch block) |
Part 2 and Part 5 |
Error: Unexpected input: '*' inside a list literal (spread) |
Part 2 |
Warn: 'Channel' to access channel factories is deprecated |
Part 1 |
Warn: Implicit closure parameter is deprecated |
Part 1 |
Silent: String x = ..., Integer count = 0, List xs = ... |
Part 1 (theory) and Part 2 |
Error: Unexpected input: 'addParams' on an include line |
Part 3 |
Error: Unexpected input: 'RUN_ID' (unquoted env declaration) |
Part 4 |
Error: Unexpected input: ''' (uses of shell:) |
Part 4 |
Output file silently empty run_id= line |
Part 4 (runtime footgun — ${VAR} vs \$VAR) |
Error: Variable declarations cannot be mixed with config statements |
Part 5 |
Error: 'USER' is not defined in a config file |
Part 5 |
WARN: Static typing is a preview feature |
Part 6 (expected — not a problem) |
Error: No such variable: out after a typed workflow call |
Part 6 |
Error: <name> is not defined inside a publish: block |
Part 7 |
Workflow hangs after enabling a versions topic |
Part 7 (cycle warning) |
Unsure whether nextflow module install belongs in this PR |
Part 8 |
Next steps
- Read the full strict syntax documentation.
- Review Nextflow 26.04 migration notes.
- For nf-core configs, use the nf-core strict syntax migration guide.
- When you start using static typing, topic channels, workflow outputs, or registry modules in production, come back to Parts 6–8 — they are written as forward references on purpose.