Repository navigation
Support pipeline composition - #183
Merged
Merged
Conversation
bentsherman
force-pushed
the
pipeline-composition
branch
from
September 24, 2026 15:31
f3036ad to
e56da44
Compare
A pipeline -- the params / workflow / output trio of a script -- can be included as a named workflow. Navigate to the params or output block of the module for an include of one, and render an entry workflow as the pipeline it belongs to on hover. An included pipeline has no name of its own, which the workspace preview and the DAG preview assumed. Signed-off-by: Ben Sherman <bentshermann@gmail.com>
bentsherman
force-pushed
the
pipeline-composition
branch
from
September 24, 2026 17:21
e56da44 to
8a32414
Compare
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
bentsherman
marked this pull request as ready for review
September 30, 2026 17:39
Render an included pipeline with its alias on hover, and drop the navigation to the params block of an included pipeline. Signed-off-by: Ben Sherman <bentshermann@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Language server support for pipeline composition (nextflow-io/nextflow#7213): a pipeline -- the
params/workflow/outputtrio of a script -- can be included as a named workflow.include { params as RnaseqParams ; workflow as NFCORE_RNASEQ } from './pipelines/nf-core/rnaseq' workflow { main: rnaseq = NFCORE_RNASEQ( params.rnaseq ) ... }Important
Draft: this does not build yet. It needs two
nf-langadditions from nextflow-io/nextflow#7213 that are not released. See Release ordering.The suite here is green only against a local
nf-langbuilt from that branch, resolved viamavenLocal()over the pinned26.08.0-edge. That build is also ahead of thev26.08.0-edgetag by the twelve nf-lang commits merged tomastersince, including #7557 and #7342. This branch has never been built against the released artifact, and cannot be untilnf-langis cut -- the two hooks are missing from it.Include resolution itself comes for free -- the language server runs
nf-lang's ownResolveIncludeVisitor-- so this PR covers only what the language server implements itself.Changes
Calling a pipeline (
TypeCheckingVisitorEx)A pipeline declares its inputs with a params block rather than a
take:section, so its entry workflow has no parameters. Every pipeline call therefore reportedWorkflow `NFCORE_RNASEQ` expects 0 argument(s) but received 1, and the call's return type was inferred asvoid.checkPipelineCallhandles the call against the pipeline instead:rnaseq.bamsresolves andrnaseq.countsis reported.NFCORE_RNASEQ( params.rnaseq + record(input: ch) )) is left to the runtime params validation, rather than modelling record arithmetic here.Named arguments also get
_NAMED_PARAMmetadata, so go-to-definition on one lands on the param declaration.Navigation and hover
The
paramsandoutputblocks of an included pipeline are record types synthesized for the include. They are not in any file's AST, so they have no URI and go-to-definition silently did nothing.getDefinitionnow redirects such a type to the block it was synthesized from.An entry workflow rendered as
workflow <entry>on hover. It is now rendered as the pipeline it belongs to, which is the signature a caller needs:Null-name guards
An included pipeline is a
WorkflowNodewith no name of its own. Two places assumed otherwise:WorkspacePreviewProvider.childrenpassed the name straight toMap.of, which rejects null values.DataflowVisitor.visitPipelinelabelled a piped call with it, producing an unlabelled DAG node. It now uses the alias.Tests
ScriptPipelineCompositionTest, six cases: no diagnostics for a full three-block include, definition of an included params block, pipeline hover, unknown param, missing param, and output type inference. Full suite green.Not included
include { ... }forworkflow,paramsandoutput. There is no completion there at all today, so nothing regressed, but it is where these are least discoverable.ASTParentVisitor, so this has never worked for any record type -- not specific to pipeline composition.workflow <entry>.Release ordering
ResolveIncludeVisitor.getPipelineBlock(ClassNode), for navigating to an includedparams/outputblock.ScriptNode.getPipeline(WorkflowNode), for resolving a pipeline's blocks from a call to it.nf-langreleaseio.nextflow:nf-langhere, mark this PR ready