-
Notifications
You must be signed in to change notification settings - Fork 0
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 class not resolved in param declaration #47
Comments
Implicit environment variables like this will not be supported in the future because it is impossible to tell between an environment variable and a regular variable. We may add some alternative syntax in the future, but for now you can do |
Alright, thanks, I see, I tried to make this change, but I receive a "System is not defined" issue now. This error appears only for "System" commands called outside workflow and process context, it seems it works okay otherwise. |
Another thing popped up after I implemented the change, when I define an |
I am seeing the issue with System.getenv in a param declaration, I will look into it Regarding the |
The thing is that until now, the env vars were picked just fine by the script as well... Wasn't this not intended? If I just leave the variables as is, without using System.getenv, they work perfectly fine, with the right value given in the config. |
Interesting, that is not the intention, see the relevant docs here: https://nextflow.io/docs/latest/reference/config.html#env Can you share a minimal test case where an env in the config is printed in the script? |
Actually it was pretty easy to replicate: env {
FOO = 'bar!'
} println "${FOO}" $ nextflow run test.nf
N E X T F L O W ~ version 24.10.0
Launching `test.nf` [shrivelled_almeida] DSL2 - revision: 320593a247
bar! @pditommaso FYI, it looks like config env settings are exposed in the script? |
(...it would be great to have this non-intended behavior stay as is, changing profiles and having env variables adapt to these changes is really, really helpful 🥹) |
Not 100% sure it was desired. We may need to review along with the mechanism to access env variables both in config and script files. Maybe, it could be used |
I was thinking the same, |
The issue with |
How to deal with "undefined" variables, that are loaded by nextflow.config or exist in the environment?
Is there a way to silence these errors? If so it would be nice to have a quick fix above for ignoring that error at a line basis.
The text was updated successfully, but these errors were encountered: