Skip to content
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

Fix the invocation of function with gstring #5020

Merged
merged 1 commit into from
May 22, 2024

Conversation

pditommaso
Copy link
Member

This fixes the invocation of a module function having a String type in the signature and GString value as argument.

Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Copy link

netlify bot commented May 22, 2024

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 8c697f7
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/664e06e995d57d000808b7b9

@bentsherman
Copy link
Member

I think we can solve this in a much simpler way:

This logic which was removed by #4840:

        else if( config instanceof GString ) {
            final holdSecrets = config.values.any { it instanceof SecretHolder }
            return holdSecrets ? config : config.toString()
        }

So let's just add it back without the secrets part:

        else if( config instanceof GString ) {
            return config.toString()
        }

@pditommaso
Copy link
Member Author

The problem is not specific to config file. That's an inconsistency in the logic for function invocation on nextflow modules

@bentsherman
Copy link
Member

Never mind, I just confirmed that it happens regardless of the config setting. Let's go with the more general solution

@pditommaso pditommaso merged commit 04317f0 into master May 22, 2024
21 checks passed
@pditommaso pditommaso deleted the fix-function-invokation-with-gstring branch May 22, 2024 15:36
marcodelapierre pushed a commit that referenced this pull request May 31, 2024
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Dr Marco Claudio De La Pierre <marco.delapierre@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Config-defined params using interpolated strings are stored as GStrings instead of Strings as of #4840
2 participants