eth-cscs / stackinator

https://eth-cscs.github.io/stackinator/
BSD 3-Clause "New" or "Revised" License
19 stars 15 forks source link

compiler paths can be null/None #173

Closed simonpintarelli closed 3 months ago

simonpintarelli commented 3 months ago

Filter None from compiler paths, before calling os.path.dirname.

Compiler paths (for example clang) might be empty.

compilers:
- compiler:
    spec: clang@=18.1.1
    paths:
      cc: clang
      cxx: clang++
      f77: null
      fc: null
    flags: {}

causing the following error:

==> Updating view at /user-environment/env/default
...
  File "/dev/shm/boeschf/ml-base_env/add-compiler-links.py", line 70, in <module>
    local_paths = set([os.path.dirname(v) for k, v in c["paths"].items()])
  File "/dev/shm/boeschf/ml-base_env/add-compiler-links.py", line 70, in <listcomp>
    local_paths = set([os.path.dirname(v) for k, v in c["paths"].items()])
  File "/usr/lib64/python3.6/posixpath.py", line 156, in dirname
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
...