-
Notifications
You must be signed in to change notification settings - Fork 621
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
Config-defined params using interpolated strings are stored as GStrings instead of Strings as of #4840 #4944
Comments
Bumping this, facing the same issue here when I am testing Nextflow The change of class from As the author above, I would like to know whether it is intentional or unintentional before updating my codes. (I hope it is unintentional and will be reverted) |
Thanks for reporting this issue. Likely the change was made unintentionally; however the correct behavior should be the GString is coerced to String when invoking the function. For example:
Can you produce a test case showing the failure of your function? |
Further testing seems to demostrate that it requires several criteria altogether to trigger the unexpected behaviour:
This is the minimal reproducible example that should be able to reproduce the error Directory Tree
Running either
|
Ok, this will be solved by this PR #5020 |
Thanks for the quick turnaround, so it will be part of the 24.04.2 update if I understand its label correctly? |
yes |
Bug report
Expected behavior and actual behavior
Prior to #4840 all string-valued params were stored in the ParamsMap as
java.lang.String
s, but since then all interpolated strings are groovyGString
s. I noticed this when passing a string-valued param to my helper function with a String-typed arg started failing on 24.03.0-edge. I could add an explicittoString()
call in my code but this change in Nextflow behavior was probably not intentional.I think the key change was this line in a deleted block of code, where toString was originally called on any GStrings that aren't secrets (at least this is how I understand that code):
v24.02.0-edge...v24.03.0-edge#diff-06c5c01a6a87bb8d43db5f4132f1c562b768da582ae3b969d7b8d29d92687373L846
(ConfigBuilder.groovy line 846 in 24.02.0-edge, since that link seems flaky)
Steps to reproduce the problem
command to run:
Program output
expected (seen with 24.02.0-edge and earlier) :
actual (seen with #4840 / 00c9f22 and later including 24.03.0-edge) :
Environment
The text was updated successfully, but these errors were encountered: