Skip to content

Conversation

@ewels
Copy link
Member

@ewels ewels commented Dec 3, 2025

I didn't really mean to do this, I was just sort of curious and prodding around with @claude, then one thing led to another, and here we are.. 🤷🏻

This PR includes *all* upcoming syntax changes. Primarily:

  • Workflow inputs (params) - typed
  • Workflow outputs
  • Typed process inputs

It is meant as a demonstrator of what kind of changes will be needed for the training material - I'm not expecting that we merge as-is. It's possible that we can slice off some of this work and repackage in another PR to kickstart the update process.

ewels added 4 commits December 3, 2025 14:44
Mostly written by Claude, with some guiding and edits from @ewels.
Solutions scripts tested, but material not read and checked in detail yet.
@netlify
Copy link

netlify bot commented Dec 3, 2025

Deploy Preview for nextflow-training ready!

Name Link
🔨 Latest commit f4a66e4
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-training/deploys/693056f24044e100084b4627
😎 Deploy Preview https://deploy-preview-742--nextflow-training.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

Nextflow linting complete!

❌ 4 files had 23 errors
✅ 152 files had no errors

💡 Tip: Click filename locations to go directly to that code.

View all 23 issues
Type Location Message
Error hello-nf-core/solutions/composable-hello/hello.nf:11:1 Invalid include source: '/home/runner/work/training/training/hello-nf-core/solutions/composable-hello/modules/sayHello.nf'
Error hello-nf-core/solutions/composable-hello/hello.nf:12:1 Invalid include source: '/home/runner/work/training/training/hello-nf-core/solutions/composable-hello/modules/convertToUpper.nf'
Error hello-nf-core/solutions/composable-hello/hello.nf:13:1 Invalid include source: '/home/runner/work/training/training/hello-nf-core/solutions/composable-hello/modules/collectGreetings.nf'
Error hello-nf-core/solutions/composable-hello/hello.nf:14:1 Invalid include source: '/home/runner/work/training/training/hello-nf-core/solutions/composable-hello/modules/cowpy.nf'
Error hello-nf-core/solutions/composable-hello/hello.nf:24:5 sayHello is not defined
Error hello-nf-core/solutions/composable-hello/hello.nf:27:5 convertToUpper is not defined
Error hello-nf-core/solutions/composable-hello/hello.nf:27:20 sayHello is not defined
Error hello-nf-core/solutions/composable-hello/hello.nf:30:5 collectGreetings is not defined
Error hello-nf-core/solutions/composable-hello/hello.nf:30:22 convertToUpper is not defined
Error hello-nf-core/solutions/composable-hello/hello.nf:33:5 cowpy is not defined
Error hello-nf-core/solutions/composable-hello/hello.nf:33:11 collectGreetings is not defined
Error hello-nf-core/solutions/composable-hello/hello.nf:36:20 cowpy is not defined
Error hello-nf-core/solutions/core-hello-part2/nextflow.config:154:17 Invalid include source: '/home/runner/work/training/training/hello-nf-core/solutions/core-hello-part2/conf/test_full.config'
Error side-quests/solutions/workflows_of_workflows/workflows/greeting.nf:1:1 Invalid include source: '/home/runner/work/training/training/side-quests/solutions/workflows_of_workflows/modules/validate_name.nf'
Error side-quests/solutions/workflows_of_workflows/workflows/greeting.nf:2:1 Invalid include source: '/home/runner/work/training/training/side-quests/solutions/workflows_of_workflows/modules/say_hello.nf'
Error side-quests/solutions/workflows_of_workflows/workflows/greeting.nf:3:1 Invalid include source: '/home/runner/work/training/training/side-quests/solutions/workflows_of_workflows/modules/timestamp_greeting.nf'
Error side-quests/solutions/workflows_of_workflows/workflows/greeting.nf:11:24 VALIDATE_NAME is not defined
Error side-quests/solutions/workflows_of_workflows/workflows/greeting.nf:12:24 SAY_HELLO is not defined
Error side-quests/solutions/workflows_of_workflows/workflows/greeting.nf:13:26 TIMESTAMP_GREETING is not defined
Error side-quests/solutions/workflows_of_workflows/workflows/transform.nf:1:1 Invalid include source: '/home/runner/work/training/training/side-quests/solutions/workflows_of_workflows/modules/say_hello_upper.nf'
Error side-quests/solutions/workflows_of_workflows/workflows/transform.nf:2:1 Invalid include source: '/home/runner/work/training/training/side-quests/solutions/workflows_of_workflows/modules/reverse_text.nf'
Error side-quests/solutions/workflows_of_workflows/workflows/transform.nf:10:20 SAY_HELLO_UPPER is not defined
Error side-quests/solutions/workflows_of_workflows/workflows/transform.nf:11:23 REVERSE_TEXT is not defined

Set the following environment variable before running any workflows:

```bash
export NXF_SYNTAX_PARSER=v2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we going to set this by default in the training environment? If so, can we make this a much shorter note to tell people running in their own environment to check requirements for local installation, and have the details live there? I really don't want to add a half page of warnings about previews and syntax requirements in a beginner training intro.

Copy link
Member Author

@ewels ewels Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do, but that'll tell Nextflow to use the new syntax parser for all the training courses. Which we don't want yet, until they're all updated.

This is where timelines matter. This will become the default in 2026, so won't be needed from that point onwards. So if we're fast at updating all the courses, then yes - let's stick it into the dev environment. If not, then I think we need to tell people to do it themselves.

Probably the most user-friendly way to do this is to have an interactive script that runs on codespaces init that prompts the user to ask which course they're doing, then sets some env variables accordingly.

Or, *controvercy alert*, we split up the courses into separate repos and/or containers and have one per course.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hahaha I hate both of those options. I don't want to have major differences in requirements for different courses except for specific super advanced topics, and they all have to work within a single environment.

So we just update syntax for everything in one go. It's the most sane option for end-users.

Copy link
Member

@pditommaso pditommaso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think we should include preview features in the training material

@vdauwera
Copy link
Collaborator

vdauwera commented Dec 3, 2025

I do not think we should include preview features in the training material

Completely agree. We've discussed this over slack and are making a plan to do the updates for released features now (use strict syntax across all courses) and another batch mid-year once the preview features are released.

@ewels ewels marked this pull request as draft December 3, 2025 16:36
@ewels ewels changed the title hello-nextflow: new Nextflow syntax [EXAMPLE] hello-nextflow: new Nextflow syntax (full) Dec 3, 2025
@ewels
Copy link
Member Author

ewels commented Dec 3, 2025

I do not think we should include preview features in the training material

Yeah apologies - I opened the PR in tandem with an ongoing Slack thread so the context there was clear, but not when seeing the PR stand alone. I've updated the PR description and status to make this clear.

@ewels ewels dismissed pditommaso’s stale review December 3, 2025 16:40

Not intending to merge this PR

@pditommaso
Copy link
Member

Awesome, thanks 🙏

output:
path 'output.txt'
file 'output.txt'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor point since typed processes shouldn't be used here until they are stable, but the "canonical" syntax here should use parentheses because it is just a function call returning a value, not a type qualifier like in the old process syntax

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth updating the docs in that case?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the docs are pretty clear

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, too many types!

Comment on lines +3 to +4
nextflow.preview.types = true

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed here. Did the language server add this? It should only add this flag if there were processes that were auto-converted

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No this was me / claude being over-zealous in adding it. I didn't do any language server auto-correction here.

@ewels
Copy link
Member Author

ewels commented Dec 3, 2025

Ok I pulled out the parts of this PR that are for inputs + outputs + strict syntax and put them into a separate PR: #743

Can leave this one here for future reference if we want, or just close it out (can always refer to it in closed state).

@vdauwera
Copy link
Collaborator

vdauwera commented Dec 3, 2025

Ok I pulled out the parts of this PR that are for inputs + outputs + strict syntax and put them into a separate PR: #743

Can leave this one here for future reference if we want, or just close it out (can always refer to it in closed state).

Let's close it out to avoid confusion

@ewels ewels closed this Dec 3, 2025
@ewels ewels deleted the nextflow-hello-new-syntax branch December 3, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants