Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/migrations/25-10.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ This feature addresses previous inconsistencies in timestamp representations.

- The `nextflow.config.schema` package was renamed to `nextflow.config.spec`. Plugin developers that define custom [configuration scopes][dev-plugins-extension-points-config] will need to update their imports accordingly.

### Cache-breaking changes

The commands of `eval` outputs are now included in the task hash. This fixes a bug where editing an `eval` command did not re-execute the task. However, every process with an `eval` output will be re-executed on the first resume after upgrading.

## Deprecations

- The legacy type detection of CLI parameters is disabled when using the strict parser (`NXF_SYNTAX_PARSER=v2`). [Legacy parameters][workflow-params-legacy] should not rely on legacy type detection. Alternatively, use the new `params` block to convert CLI parameters based on their type annotations. Legacy type detection can be disabled globally by setting the environment variable `NXF_DISABLE_PARAMS_TYPE_DETECTION=true`.
Expand Down
6 changes: 6 additions & 0 deletions docs/migrations/26-04.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,12 @@ A Platform access token with appropriate permissions is required to download non

- The [strict syntax parser][strict-syntax-page] is now enabled by default. The legacy parser can be enabled by setting the `NXF_SYNTAX_PARSER` environment variable to `v1`.

### Cache-breaking changes

Maps are hashed differently. The hash now includes both map keys and values, where before it included only the values.

This fixes a bug where changing a map input to a task did not re-execute it. However, any process with a map input will be re-executed on the first resume after upgrading.

## Deprecations

- The `nextflow.enable.strict` feature flag is deprecated. It is not needed when using the [strict parser][strict-syntax-page].
Expand Down
271 changes: 271 additions & 0 deletions docs/migrations/26-10.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,271 @@
---
title: Migrating to 26.10
description: Review new features, breaking changes, and deprecations introduced in Nextflow 26.10.
---

# Migrating to 26.10

[Nextflow 26.10](https://github.com/nextflow-io/nextflow/releases/tag/v26.10.0) is scheduled to release in October 2026.

## New features

### Global cache

The global cache is a shared, content-addressable cache backed by cloud storage. It stores all task executions in a single work directory. Whereas `-resume` only reuses work from a previous run of the same pipeline, the global cache can reuse tasks across different runs.
Comment thread
bentsherman marked this conversation as resolved.

The global cache is available through Seqera Platform. It supports AWS, Google Cloud, and Azure.

### Static typing (out of preview)

[Static typing][static-typing], introduced in Nextflow 25.10 as a preview feature, has been brought out of preview. The syntax is unchanged since 26.04. This release brings type checking to the Nextflow CLI in addition to the language server.
Comment thread
bentsherman marked this conversation as resolved.
Outdated

`nextflow lint` reports type errors for any script that enables `nextflow.enable.types`. `nextflow run` warns when type errors are found, but does not fail the run.
Comment thread
bentsherman marked this conversation as resolved.
Outdated

The `nextflow.enable.types` flag is still required in every script that uses typed processes or typed workflows.
Comment thread
bentsherman marked this conversation as resolved.
Outdated

### Workflow modules

The [module system][module-registry] now supports workflows as well as processes.

A module is a standalone process or a standalone workflow. A workflow module can be published to the Nextflow registry, installed, and included using the same commands and include syntax:
Comment thread
bentsherman marked this conversation as resolved.
Outdated

```nextflow
// process module
include { BWA_MEM } from 'nf-core/bwa/mem'

// workflow module
include { FASTQ_ALIGN_STAR } from 'nf-core/fastq_align_star'
```

A workflow module can depend on other modules by declaring them in the module spec and including them in the module script. When a workflow module is installed, it vendors its dependencies under its own `modules` directory, so two workflows can depend on different versions of the same module without conflict. Edit the declared versions in `meta.yml` and re-vendor them with `module install -update-deps`.
Comment thread
bentsherman marked this conversation as resolved.
Outdated

A typed workflow module can be executed directly with `nextflow module run`:
Comment thread
bentsherman marked this conversation as resolved.
Outdated

```bash
# create a typed workflow module
nextflow module create -kind Workflow acme/hello

# run the workflow module
nextflow module run acme/hello --greeting 'Hello world!'
```

Each `take:` input becomes a param of the same name, and its declared type determines how the value is read. A `Channel<E>` input takes a samplesheet path, which Nextflow loads as a channel of records, validating and converting each row against the element type. The samplesheet can be CSV, JSON, or YAML. Each `emit:` output is reported as a workflow output.
Comment thread
bentsherman marked this conversation as resolved.
Outdated

See [Modules][module-registry] and [Typed parameters][workflow-typed-params] for details.

### Pipeline composition

A pipeline -- the `params` block, entry workflow, and `output` block of a script -- can be included and called like a named workflow. The `params` block acts as the `take:` section and the `output` block acts as the `emit:` section. This way, you can compose pipelines with regular dataflow logic.
Comment thread
bentsherman marked this conversation as resolved.
Outdated

Given a pipeline:

```nextflow
// pipelines/rnaseq.nf
nextflow.enable.types = true

params {
input: Channel<Sample>
aligner: String = 'star_salmon'
fasta: Path
}

workflow {
// ...
}

output {
bams: Channel<Path> { path 'bams' }
multiqc: Path { path 'multiqc' }
}
```

Include it with the `workflow` keyword, name it with an alias, and call it with a record of params:

```nextflow
// main.nf
nextflow.enable.types = true

include { workflow as RNASEQ } from './pipelines/rnaseq.nf'

workflow {
main:
rnaseq = RNASEQ(record(
input: channel.of( /* ... */ ),
fasta: file('index.fasta')
))
rnaseq.bams.view() // Channel<Path>
rnaseq.multiqc.view() // Value<Path>
}
```

The `rnaseq.nf` pipeline can be run directly from the CLI or included like a named workflow. When included, the pipeline can consume a channel from an upstream pipeline, allowing it to process each item as soon as it is emitted.
Comment thread
bentsherman marked this conversation as resolved.
Outdated

Both the calling script and the included pipeline must enable static typing.

See [Pipeline composition][pipeline-composition] for details.

### Agents (preview)

:::warning
Agents are a preview feature. Their syntax and behavior may change in future releases.
:::

An agent is a process-shaped primitive that wraps an agent run. It declares inputs and outputs, renders a prompt, calls a language model, and emits the result:

```groovy
// nextflow.config
agent.runner = 'pi'
```

```nextflow
agent qa {
model 'openai/gpt-5-mini'
instruction 'You are a concise scientific assistant.'

input:
question: String

output:
answer: String

prompt:
"""
Answer briefly: ${question}
"""
}

workflow {
qa('What is FASTQ format?').view()
}
```

Each invocation runs as an ordinary Nextflow task with a work directory, retries, parallelism, caching, and lineage. Agents can be composed like processes with regular dataflow logic.
Comment thread
bentsherman marked this conversation as resolved.
Outdated

See [Agents][agent-page] for details.

## Enhancements

### Formatter preserves comments

The Nextflow formatter (`nextflow lint -format`) now preserves all comments in scripts and config files. Previously, comments were preserved only in specific locations, otherwise they were discarded.
Comment thread
bentsherman marked this conversation as resolved.
Outdated

### `logfile` command

The new `logfile` command prints a `.nextflow.log` file, with optional level filtering and follow mode:

```console
$ nextflow logfile kickass_rutherford -level ERROR
$ nextflow logfile last -f
```

The argument can be a run name, a session id or a unique prefix of one, the literal `last`, or a path to a log file.
Comment thread
bentsherman marked this conversation as resolved.
Outdated

See the [`logfile`][cli-logfile] command reference for details.

### Accelerator directive for local executor

The local executor now allocates accelerators such as GPUs to tasks that request them with the `accelerator` directive. Set the environment variable for your accelerator type to declare which devices are available. See [Local executor][executor-local] for details.

### Publish targets as a map

The `path` directive of a workflow output can return a map of source files to publish targets, which is equivalent to using the `>>` operator for each pair:
Comment thread
bentsherman marked this conversation as resolved.
Outdated

```nextflow
output {
samples {
path { sample -> [
(sample.fastq_1): "fastq/${sample.id}/",
(sample.fastq_2): "fastq/${sample.id}/"
] }
}
}
```

This way, the publish mapping can be extracted to a shared function, e.g., for pipeline composition.
Comment thread
bentsherman marked this conversation as resolved.
Outdated

See [Workflow outputs][workflow-output-def] for details.

### Reports in the output directory

The DAG, execution report, timeline, and trace file can be saved to the workflow output directory instead of the launch directory, using the new `directory` option in each scope:
Comment thread
bentsherman marked this conversation as resolved.
Outdated

```groovy
report {
enabled = true
directory = 'pipeline_info'
}
```

The path is resolved against `outputDir` and must be a relative path within it.

### Configurable plugin registries

Nextflow resolves plugins from the public registry at `https://registry.nextflow.io` by default. Additional registries can now be configured through the `registry` config scope, and are tried in order. See [Plugin registry][plugin-registry] for details.
Comment thread
bentsherman marked this conversation as resolved.
Outdated

### smolvm container engine

Nextflow can run tasks in [smolvm](https://github.com/smol-machines/smolvm) microVMs. See [smolvm][container-smolvm] for details.

## Breaking changes

- The `-with-weblog` run option is no longer supported. Use the [nf-weblog](https://github.com/nextflow-io/nf-weblog) plugin instead.

- The `echo` process directive was removed. Use `debug` instead.

- The Kubernetes executor uses Jobs by default instead of Pods. Set [`k8s.computeResourceType`][config-k8s-computeResourceType] to `Pod` to keep the previous behavior.

- Nextflow console output is written to standard error instead of standard output, so that the output of commands such as `nextflow inspect` and `nextflow run -output-format json` is not mixed with log messages.
Comment thread
bentsherman marked this conversation as resolved.
Outdated

### Cache-breaking changes

The hash function for `eval` commands was changed. This fixes a bug where tasks with `eval` outputs did not have a stable hash across runs. However, every process with an `eval` output will be re-executed on the first resume after upgrading.
Comment thread
bentsherman marked this conversation as resolved.
Outdated

## Deprecations

- The `storeDir` process directive is deprecated. Use explicit workflow logic to reuse an intermediate output if it is present and compute it otherwise. See [`storeDir`][process-storeDir] for an example.

- The [`seqera.executor.autoLabels`][config-seqera-executor-autoLabels] config option is deprecated. Use [`tower.autoLabels`][config-tower-autoLabels] instead, which applies to every executor that supports the `resourceLabels` directive.

- Machine type selection for Google Batch through the Seqera Cloud Info service is deprecated, along with the [`NXF_CLOUDINFO_ENABLED`][env-vars-NXF_CLOUDINFO_ENABLED] environment variable.

## Miscellaneous

- New config option: [`apptainer.resourceLimits`][config-apptainer-resourceLimits]
- New config option: [`azure.batch.pools.<name>.allowUnverifiedImages`][config-azure-batch-pools-allowUnverifiedImages]
- New config option: [`azure.batch.pools.<name>.virtualMachineImageId`][config-azure-batch-pools-virtualMachineImageId]
- New config option: [`dag.directory`][config-dag-directory]
- New config option: [`docker.cpuLimits`][config-docker-cpuLimits]
- New config option: [`manifest.diagram`][config-manifest-diagram]
- New config option: [`report.directory`][config-report-directory]
- New config option: [`seqera.executor.machineRequirement.onDemandCostRatio`][config-seqera-executor-onDemandCostRatio]
- New config option: [`singularity.resourceLimits`][config-singularity-resourceLimits]
- New config option: [`timeline.directory`][config-timeline-directory]
- New config option: [`tower.autoLabels`][config-tower-autoLabels]
- New config option: [`trace.directory`][config-trace-directory]

[agent-page]: ../agent
[cli-logfile]: ../reference/cli/logfile
[config-apptainer-resourceLimits]: ../reference/config/apptainer#apptainerresourcelimits
[config-azure-batch-pools-allowUnverifiedImages]: ../reference/config/azure#azurebatchpoolsnameallowunverifiedimages
[config-azure-batch-pools-virtualMachineImageId]: ../reference/config/azure#azurebatchpoolsnamevirtualmachineimageid
[config-dag-directory]: ../reference/config/dag#dagdirectory
[config-docker-cpuLimits]: ../reference/config/docker#dockercpulimits
[config-k8s-computeResourceType]: ../reference/config/k8s#k8scomputeresourcetype
[config-manifest-diagram]: ../reference/config/manifest#manifestdiagram
[config-report-directory]: ../reference/config/report#reportdirectory
[config-seqera-executor-autoLabels]: ../reference/config/seqera#seqeraexecutorautolabels
[config-seqera-executor-onDemandCostRatio]: ../reference/config/seqera#seqeraexecutormachinerequirementondemandcostratio
[config-singularity-resourceLimits]: ../reference/config/singularity#singularityresourcelimits
[config-timeline-directory]: ../reference/config/timeline#timelinedirectory
[config-tower-autoLabels]: ../reference/config/tower#towerautolabels
[config-trace-directory]: ../reference/config/trace#tracedirectory
[container-smolvm]: ../container/smolvm
[env-vars-NXF_CLOUDINFO_ENABLED]: ../reference/env-vars#nxf_cloudinfo_enabled
[executor-local]: ../executor/local#accelerators
[module-registry]: ../modules
[pipeline-composition]: ../workflow-typed#pipeline-composition
[plugin-registry]: ../plugins/plugin-registry#configuring-plugin-registries
[process-storeDir]: ../reference/process/directives/store-dir
[static-typing]: ../static-typing
[workflow-output-def]: ../workflow#outputs
[workflow-typed-params]: ../typed-parameters
6 changes: 6 additions & 0 deletions docs/static-typing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ description: Overview of static typing in Nextflow, including typed processes, t

# Static typing

<AddedInVersion version="26.10">
Static typing is available as a preview in Nextflow [25.10][static-typing-first-preview] and [26.04][static-typing-second-preview].
</AddedInVersion>

Static typing lets you model and validate the structure of your data as it flows through a pipeline. You add [standard Nextflow types][stdlib-types] to inputs and outputs at every level, from pipeline parameters to process and workflow outputs. Nextflow uses those annotations to catch type-related errors at compile-time.

:::note
Expand Down Expand Up @@ -68,6 +72,8 @@ Static typing builds on functionality documented in other sections:
[migrating-static-types-operators]: ./tutorials/static-types-operators
[preparing-static-types]: ./tutorials/static-types#preparing-for-static-typing
[process-typed-page]: ./process-typed
[static-typing-first-preview]: ./migrations/25-10#static-typing-preview
[static-typing-second-preview]: ./migrations/26-04#static-typing-preview
[stdlib-types]: ./reference/stdlib-types
[strict-syntax-page]: ./strict-syntax
[syntax-output-block]: ./reference/syntax#output-block
Expand Down
Loading
Loading