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 closure rendering in yaml and json config #5408

Merged
merged 4 commits into from
Oct 18, 2024

Conversation

pditommaso
Copy link
Member

This PR fixed the rendering of closures in config file reporting as strings.

For example

{ 
   "process": {
        "memory": "{ 1.GB }"
    }
} 

or

process:
  memory: '{ 1.GB }'

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

netlify bot commented Oct 17, 2024

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 589fdcc
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/671259a2dbc6e8000807f8db

Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Comment on lines +365 to +372
if( value instanceof Map ) {
final map = value as Map
final ret = new LinkedHashMap(map.size())
for( Map.Entry entry : map.entrySet() ) {
ret.put(entry.key, normaliseObject0(entry.value))
}
return ret
}
Copy link
Member

Choose a reason for hiding this comment

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

is there a case where you would have a closure in a list? I can't think of any

Copy link
Member Author

Choose a reason for hiding this comment

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

Likely we don't any in the config, but as general solution makes sense to have it

@pditommaso pditommaso merged commit d3a85ce into master Oct 18, 2024
11 checks passed
@pditommaso pditommaso deleted the fix-clousure-rendering branch October 18, 2024 13:03
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.

2 participants