Skip to content

Fix GString equality checks with String #6330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bentsherman
Copy link
Member

This PR improves the semantics of GStrings and lazy expressions in the strict syntax.

  • GStrings are coerced into Strings by appending .toString() under the hood, so that equality checks like "${'test'}" == 'test' are correct.

  • Lazy expressions in process inputs/outputs/directives are handled more consistently. Before, only GStrings and property expressions were lazily evaluated. Now, any expression that references a variable is wrapped in a closure.

Copy link

netlify bot commented Aug 6, 2025

Deploy Preview for nextflow-docs-staging ready!

Name Link
🔨 Latest commit 7c040c7
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/68950e1d07512a0008acafa1
😎 Deploy Preview https://deploy-preview-6330--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.

Copy link
Collaborator

@christopher-hakkaart christopher-hakkaart left a comment

Choose a reason for hiding this comment

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

A couple of non-blocking suggestions. Please check meaning is retained.

Nextflow will evaluate this directive dynamically if it references task inputs. Directives that use an explicit closure are still resolved dynamically.

:::{note}
Process configuration options must still be specified with a closure in order to be dynamic.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Process configuration options must still be specified with a closure in order to be dynamic.
Process configuration options must be specified with a closure to be dynamic.

:::{versionadded} 25.10
:::

Dynamic directives do not need to be wrapped in a closure when using the {ref}`strict syntax <strict-syntax-page>`:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Dynamic directives do not need to be wrapped in a closure when using the {ref}`strict syntax <strict-syntax-page>`:
Dynamic directives do not need to be wrapped in closures when using the {ref}`strict syntax <strict-syntax-page>`:

Treating Dynamic directives as plural

```

Note, however, that the latter syntax can be used both for a directive's main argument (as in the above example) and for a directive's optional named attributes, whereas the closure syntax is only resolved dynamically for a directive's main argument.
Nextflow will evaluate this directive dynamically if it references task inputs. Directives that use an explicit closure are still resolved dynamically.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Nextflow will evaluate this directive dynamically if it references task inputs. Directives that use an explicit closure are still resolved dynamically.
Nextflow will evaluate directives dynamically if they reference task inputs. Directives that use an explicit closure are still resolved dynamically.

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.

Cannot Use params in pod directive, such as k8s.pod, process.pod. Cryptic Issue with params assignment in maps keys
2 participants