Skip to content

Conversation

@bentsherman
Copy link
Member

@bentsherman bentsherman commented Dec 19, 2025

This PR implements the first preview of record types:

  • Add Record type to standard types
  • Add record() function to create a record from named arguments
  • Add record types via record keyword for validating records
  • Add ability to destructure a record in a process input
  • Fix hashing of records

TODO:

  • Add ability to include records across modules
  • Add ability to stage record type ?
  • Add unit tests
  • Add e2e tests

Signed-off-by: Ben Sherman <[email protected]>
@netlify
Copy link

netlify bot commented Dec 19, 2025

Deploy Preview for nextflow-docs-staging ready!

Name Link
🔨 Latest commit 097f2ae
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/6945cf105f1c8b000847f82b
😎 Deploy Preview https://deploy-preview-6679--nextflow-docs-staging.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.

@bentsherman
Copy link
Member Author

This PR does not make any changes to operators, so you need some extra logic in some cases to pass records through an operator.

For example, given two record channels that you want to join:

samples_ch = fastqc_ch.join(quant_ch, by: 'id')

The above syntax is what we'd like to do, but join doesn't work with records yet, so you have to wrap the records as tuples before the join and unwrap after the join:

samples_ch = fastqc_ch.map { r -> tuple(r.id, r) }
    .join( quant_ch.map { r -> tuple(r.id, r) } )
    .map { id, r1, r2 -> r1 + r2 }

@bentsherman bentsherman added the cache-breaking Changes that will break everyone's task cache label Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cache-breaking Changes that will break everyone's task cache

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants