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

treat colon as special path in modextrapath #4442

Draft
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

smoors
Copy link
Contributor

@smoors smoors commented Jan 18, 2024

needed for fixing easybuilders/easybuild-easyconfigs#19505

draft: not yet working for tcl modules, see comments below

@smoors smoors changed the title treat paths that start with colon as absolute paths treat colon as absolute path Jan 18, 2024
@smoors smoors changed the title treat colon as absolute path treat colon as special path in modextrapath Jan 18, 2024
@boegelbot
Copy link

@smoors: Tests failed in GitHub Actions, see https://github.com/easybuilders/easybuild-framework/actions/runs/7575661081
Output from first failing test suite run:

ERROR: test_make_module_step (test.framework.easyblock.EasyBlockTest)
Test the make_module_step
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/runner/6e8156631f16daa4203d051fabb17dbdf5c93d3b/lib/python3.6/site-packages/test/framework/easyblock.py", line 1321, in test_make_module_step
    self.modtool.load(['pi/3.14'])
  File "/tmp/runner/6e8156631f16daa4203d051fabb17dbdf5c93d3b/lib/python3.6/site-packages/easybuild/tools/modules.py", line 694, in load
    self.run_module('load', mod)
  File "/tmp/runner/6e8156631f16daa4203d051fabb17dbdf5c93d3b/lib/python3.6/site-packages/easybuild/tools/modules.py", line 1284, in run_module
    return super(EnvironmentModulesTcl, self).run_module(*args, **kwargs)
  File "/tmp/runner/6e8156631f16daa4203d051fabb17dbdf5c93d3b/lib/python3.6/site-packages/easybuild/tools/modules.py", line 1216, in run_module
    return super(EnvironmentModulesC, self).run_module(*args, **kwargs)
  File "/tmp/runner/6e8156631f16daa4203d051fabb17dbdf5c93d3b/lib/python3.6/site-packages/easybuild/tools/modules.py", line 842, in run_module
    self.check_module_output(full_cmd, stdout, stderr)
  File "/tmp/runner/6e8156631f16daa4203d051fabb17dbdf5c93d3b/lib/python3.6/site-packages/easybuild/tools/modules.py", line 1384, in check_module_output
    raise EasyBuildError("Failed module command detected: %s (stdout: %s, stderr: %s)", cmd, stdout, stderr)
easybuild.tools.build_log.EasyBuildError: "Failed module command detected: tclsh /home/runner/libexec/modulecmd.tcl python load pi/3.14 (stdout: _mlstatus = False\n, stderr: Module ERROR: add-path cannot handle path equals to separator string\n  In '/tmp/eb-qmzk51pw/eb-quvkthfz/eb-8m50v45w/tmpgzk_tu2n/modules/all/pi/3.14'\n  Please contact <root@localhost>\n)"

======================================================================
ERROR: test_toy_module_fulltxt (test.framework.toy_build.ToyBuildTest)
Strict text comparison of generated module file.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/runner/6e8156631f16daa4203d051fabb17dbdf5c93d3b/lib/python3.6/site-packages/test/framework/toy_build.py", line 1452, in test_toy_module_fulltxt
    self.test_toy_tweaked()
  File "/tmp/runner/6e8156631f16daa4203d051fabb17dbdf5c93d3b/lib/python3.6/site-packages/test/framework/toy_build.py", line 311, in test_toy_tweaked
    outtxt = self.eb_main(args, do_build=True, verbose=True, raise_error=True)
  File "/tmp/runner/6e8156631f16daa4203d051fabb17dbdf5c93d3b/lib/python3.6/site-packages/test/framework/utilities.py", line 341, in eb_main
    raise myerr
  File "/tmp/runner/6e8156631f16daa4203d051fabb17dbdf5c93d3b/lib/python3.6/site-packages/test/framework/utilities.py", line 314, in eb_main
    main(args=main_args, logfile=logfile, do_build=do_build, testing=testing, modtool=modtool)
  File "/tmp/runner/6e8156631f16daa4203d051fabb17dbdf5c93d3b/lib/python3.6/site-packages/easybuild/main.py", line 732, in main
    hooks, do_build)
  File "/tmp/runner/6e8156631f16daa4203d051fabb17dbdf5c93d3b/lib/python3.6/site-packages/easybuild/main.py", line 566, in process_eb_args
    exit_on_failure=exit_on_failure)
  File "/tmp/runner/6e8156631f16daa4203d051fabb17dbdf5c93d3b/lib/python3.6/site-packages/easybuild/main.py", line 176, in build_and_install_software
    raise EasyBuildError(test_msg)
easybuild.tools.build_log.EasyBuildError: 'Build of /tmp/eb-qmzk51pw/eb-quvkthfz/eb-6hi2w9dq/tmpcp3yq_iw/toy-0.0-tweaked.eb failed (err: "build failed (first 300 chars): Failed module command detected: tclsh /home/runner/libexec/modulecmd.tcl python load toy/0.0-tweaked (stdout: _mlstatus = False\\n, stderr: Module ERROR: add-path cannot handle path equals to separator string\\n  In \'/tmp/eb-qmzk51pw/eb-quvkthfz/eb-6hi2w9dq/eb-hfqsof5c/eb-ndhqu1x_/tmpfnqoeu71/all/toy/0.")'

======================================================================
ERROR: test_toy_tweaked (test.framework.toy_build.ToyBuildTest)
Test toy build with tweaked easyconfig, for testing extra easyconfig parameters.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/runner/6e8156631f16daa4203d051fabb17dbdf5c93d3b/lib/python3.6/site-packages/test/framework/toy_build.py", line 311, in test_toy_tweaked
    outtxt = self.eb_main(args, do_build=True, verbose=True, raise_error=True)
  File "/tmp/runner/6e8156631f16daa4203d051fabb17dbdf5c93d3b/lib/python3.6/site-packages/test/framework/utilities.py", line 341, in eb_main
    raise myerr
  File "/tmp/runner/6e8156631f16daa4203d051fabb17dbdf5c93d3b/lib/python3.6/site-packages/test/framework/utilities.py", line 314, in eb_main
    main(args=main_args, logfile=logfile, do_build=do_build, testing=testing, modtool=modtool)
  File "/tmp/runner/6e8156631f16daa4203d051fabb17dbdf5c93d3b/lib/python3.6/site-packages/easybuild/main.py", line 732, in main
    hooks, do_build)
  File "/tmp/runner/6e8156631f16daa4203d051fabb17dbdf5c93d3b/lib/python3.6/site-packages/easybuild/main.py", line 566, in process_eb_args
    exit_on_failure=exit_on_failure)
  File "/tmp/runner/6e8156631f16daa4203d051fabb17dbdf5c93d3b/lib/python3.6/site-packages/easybuild/main.py", line 176, in build_and_install_software
    raise EasyBuildError(test_msg)
easybuild.tools.build_log.EasyBuildError: 'Build of /tmp/eb-qmzk51pw/eb-quvkthfz/eb-r3u6w2nh/tmpz9_dvz36/toy-0.0-tweaked.eb failed (err: "build failed (first 300 chars): Failed module command detected: tclsh /home/runner/libexec/modulecmd.tcl python load toy/0.0-tweaked (stdout: _mlstatus = False\\n, stderr: Module ERROR: add-path cannot handle path equals to separator string\\n  In \'/tmp/eb-qmzk51pw/eb-quvkthfz/eb-r3u6w2nh/eb-dovnm0tg/eb-t1l3a9ua/tmpks7e57cn/all/toy/0.")'

----------------------------------------------------------------------
Ran 858 tests in 494.200s

FAILED (errors=3)
ERROR: Not all tests were successful.

bleep, bloop, I'm just a bot (boegelbot v20200716.01)
Please talk to my owner @boegel if you notice me acting stupid),
or submit a pull request to https://github.com/boegel/boegelbot fix the problem.

@smoors
Copy link
Contributor Author

smoors commented Jan 19, 2024

modules-4 does not accept : (path separator) for appending/prepending paths, and modules-3 silently fails.
it seems that "" (empty string) should also work, needs to be tested

edit: empty string does not work if the variable was not set or empty, but the following workaround works:

if {![info exists env(JULIA_DEPOT_PATH)]} {
    setenv JULIA_DEPOT_PATH :
} else {
    append-path JULIA_DEPOT_PATH {}
}

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.

None yet

3 participants