# Strict syntax enforced by pipeline

**URL:** <https://community.seqera.io/t/strict-syntax-enforced-by-pipeline/2497>\
**Category:** Ask for help\
**Tags:** nextflow\
**Created:** [January 5, 2026, 6:23pm UTC](https://community.seqera.io/t/strict-syntax-enforced-by-pipeline/2497 "2026-01-05T18:23:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sstrong99](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/sstrong99/32/188_2.png) [@sstrong99](https://community.seqera.io/u/sstrong99)\
**Post date:** [January 5, 2026, 6:23pm UTC](https://community.seqera.io/t/strict-syntax-enforced-by-pipeline/2497/1 "2026-01-05T18:23:13Z")

</div>

I’m experimenting with strict syntax using NXF\_SYNTAX\_PARSER=v2. I’m wondering if it’s possible to indicate that a pipeline uses strict syntax in the pipeline definition itself, so i don’t need to set that environment variable everywhere that it runs. This would be helpful because after making changes for compatibility, the pipeline no longer runs on the old syntax parser.

---

<div class="post-metadata">

**Author:** ![bentsherman](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/bentsherman/32/52_2.png) [@bentsherman](https://community.seqera.io/u/bentsherman)\
**Post date:** [January 5, 2026, 7:50pm UTC](https://community.seqera.io/t/strict-syntax-enforced-by-pipeline/2497/2 "2026-01-05T19:50:58Z")

</div>

What were the changes that made your pipeline incompatible with the old parser?

The strict parser essentially allows a subset of Groovy syntax from the old parser. As long as you don’t adopt any of the new language features in 25.10, your pipeline should be able to run with either parser.

So if you found some incompatibility, that might be a bug.

---

<div class="post-metadata">

**Author:** ![bentsherman](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/bentsherman/32/52_2.png) [@bentsherman](https://community.seqera.io/u/bentsherman)\
**Post date:** [January 5, 2026, 7:59pm UTC](https://community.seqera.io/t/strict-syntax-enforced-by-pipeline/2497/3 "2026-01-05T19:59:40Z")

</div>

To answer your immediate question, there is no way to enable strict syntax in the pipeline script / config. This is because the plan is to make strict syntax the default in 26.04, and remove the old parser soon after that (e.g. 26.10).

So in practical terms, suppose a pipeline still uses syntax not allowed in the strict parser, and we remove the old parser in 26.10 (just a hypothetical, we haven’t decided for sure), the pipeline would need to specify `manifest.nextflowVersion = '!<26.10'`.

But in the meantime, any pipeline that complies with the strict syntax should also still work with the old parser.

---

<div class="post-metadata">

**Author:** ![sstrong99](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/sstrong99/32/188_2.png) [@sstrong99](https://community.seqera.io/u/sstrong99)\
**Post date:** [January 5, 2026, 8:10pm UTC](https://community.seqera.io/t/strict-syntax-enforced-by-pipeline/2497/4 "2026-01-05T20:10:53Z")

</div>

The incompatibility is that the formatter converts e.g. “catch (Exception e)” to “catch (e: Exception)”.

---

<div class="post-metadata">

**Author:** ![bentsherman](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/bentsherman/32/52_2.png) [@bentsherman](https://community.seqera.io/u/bentsherman)\
**Post date:** [January 5, 2026, 8:24pm UTC](https://community.seqera.io/t/strict-syntax-enforced-by-pipeline/2497/5 "2026-01-05T20:24:32Z")

</div>

Okay, that’s what I suspected. It’s an unfortunate rough edge that results from trying to support the old Groovy type syntax while providing an automatic migration to the new syntax. The 25.10 formatter does not necessarily try to keep your code compatible with older versions.

If you want to keep your pipeline compatible with both parsers, I would just stick to the 25.04 formatter, as described [here](https://nextflow.io/docs/latest/migrations/25-10.html#new-features) under “Type annotations”.

Or you can just remove the type annotation: `catch (e)`

---

<div class="post-metadata">

**Author:** ![sstrong99](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/sstrong99/32/188_2.png) [@sstrong99](https://community.seqera.io/u/sstrong99)\
**Post date:** [January 5, 2026, 8:39pm UTC](https://community.seqera.io/t/strict-syntax-enforced-by-pipeline/2497/6 "2026-01-05T20:39:57Z")

</div>

ok, thanks!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/system/32/2402_2.png) [@system](https://community.seqera.io/u/system)\
**Post date:** [January 12, 2026, 8:40pm UTC](https://community.seqera.io/t/strict-syntax-enforced-by-pipeline/2497/7 "2026-01-12T20:40:50Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
