Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 as a preview feature in Nextflow 25.10, is no longer in preview. The syntax has not changed since 26.04. Type checking is now available in the Nextflow CLI as well as the language server.

`nextflow lint` reports type errors for any script that enables `nextflow.enable.types`. `nextflow run` warns about type errors but does not fail the run.

Every script that uses typed processes or typed workflows must still enable `nextflow.enable.types`.

### Workflow modules

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

A module is a standalone process or workflow. You publish workflow modules to the Nextflow registry, install them, and include them with the same commands and include syntax as process modules:

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

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

To depend on other modules, a workflow module declares them in the module spec and includes them in the module script. Installing a workflow module vendors its dependencies under its own `modules` directory. Two workflows can therefore depend on different versions of the same module without conflict. To change a dependency version, edit it in `meta.yml` and re-vendor the dependencies with `module install -update-deps`.

Run a typed workflow module directly with `nextflow module run`:

```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. Its declared type determines how Nextflow reads the value. A `Channel<E>` input takes a CSV, JSON, or YAML samplesheet. Nextflow loads the samplesheet as a channel of records and validates and converts each row against the element type. Nextflow reports each `emit:` output as a workflow output.

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

### Pipeline composition

You can include a pipeline and call it like a named workflow. Here, a pipeline is the `params` block, entry workflow, and `output` block of a script. The `params` block acts as the `take:` section and the `output` block acts as the `emit:` section. Use this to compose pipelines with regular dataflow logic.

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>
}
```

You can run `rnaseq.nf` directly from the CLI or include it like a named workflow. When included, it can consume a channel from an upstream pipeline and process each item as soon as the upstream pipeline emits it.

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 agent call runs as a regular Nextflow task, with its own work directory, retries, parallelism, caching, and lineage. You can compose agents with regular dataflow logic, like processes.

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, the formatter discarded comments outside of specific locations.

### `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, `last`, or a log file.

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. This is equivalent to using the `>>` operator for each pair:

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

You can extract the publish mapping to a shared function, e.g., to reuse it when composing pipelines.

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

### Reports in the output directory

Use the new `directory` option in the `dag`, `report`, `timeline`, and `trace` scopes to save built-in reports to the workflow output directory instead of the launch directory:

```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. Use the `registry` config scope to configure additional registries. Nextflow tries them in order. See [Plugin registry][plugin-registry] for details.

### 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 writes console output to standard error instead of standard output. This separates log messages from the output of commands such as `nextflow config` and `nextflow run -output-format json`.

### Cache-breaking changes

The hash of `eval` commands has changed. This fixes a bug where tasks with `eval` outputs did not have a stable hash across runs. As a result, every process with an `eval` output re-executes on the first resume after upgrading.

## 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