Be more careful when using single quotes for Tcl syntax#2847
Be more careful when using single quotes for Tcl syntax#2847boegel merged 10 commits intoeasybuilders:developfrom
Conversation
|
I'm nervous about this change, using brackets changes the Tcl treatment of strings: "When quoting with braces, no substitutions are performed.". This means you couldn't set an additional envvar that referenced |
|
I've gone for just escaping the double quotes in the value rather than introduce behaviour changing brackets. |
boegel
left a comment
There was a problem hiding this comment.
@ocaisa Can we also add the test case mentioned in #2845 in the tests somewhere, to ensure i) the reported bug is fixed, ii) stays fixed?
I'd come up with a new (toy?) test that uses something like:
modextravars = {'TEST_FLAGS': '-Xflags1="foo bar" -Xflags2="more flags" '}And then check whether the generated module can be loaded, and what the value is for $TEST_FLAGS?
If you need help with that, shout...
|
@boegel Have you got an example of a test that checks if a module is load-able? |
|
@ocaisa see |
|
@boegel So there is an interesting(?) problem with the tests. Recent versions of Lmod ( |
|
There are two failing tests that occur with recent versions of Lmod. The contents of the test module are This is indeed correct so I don't really know what to do. When comparing the given value of the flag and the value after loading the module we fail with: |
|
I checked this against Lmod |
|
@ocaisa https://github.com/TACC/Lmod/blob/master/README.old#L14 suggests that the issue was fixed in Lmod 7.8.8. Let's try and update the Lmod 7.x versions used in Travis to the latest 7.x? We should also add an entry for latest 8.x, but let's do that in a separate PR. And I guess we should considering dropping support for Lmod 6.x in EasyBuild 4.0? |
|
Ok, the failing tests are fixed with Lmod 7.8.8 |
| - LMOD_VERSION=6.5.1 TEST_EASYBUILD_MODULE_SYNTAX=Tcl | ||
| - LMOD_VERSION=7.8.5 | ||
| - LMOD_VERSION=7.8.5 TEST_EASYBUILD_MODULE_SYNTAX=Tcl | ||
| - LMOD_VERSION=7.8.22 |
There was a problem hiding this comment.
I chose 7.8.22 rather than 7.8.90 because I saw issues on my local machine with 7.8.90 (with my Devel module that is valid with every other release)
There was a problem hiding this comment.
7.8.22 makes sense, that's the actual latest 7.8.x based on https://github.com/TACC/Lmod/blob/master/README.old#L31, 7.8.90 is more like a 8.0 beta...
|
Looking good, going in, thanks for your efforts on this @ocaisa! |
Fixes #2845