spack / spack/spack

Spack spec provider character (`^`) is escape in CMD

Open
#42,833 1 comment 0 reactions 1 assignee View on GitHub

@johnwparent is already working on this.

Since Feb 24, 2024.

bug impact-low windows
Dominant language
Python
Stars
5.1k
Forks
2.5k
Avg merge
3d 4h
Merged PRs (30d)
82

Description

This is not an issue Spack can resolve, CMD parses the command line before Spack receives it, and the CMD is responsible for butchering the spec input. This is intended to track the issue for future users who may encounter such a problem and provide some guidance on how to work around it.

Spack spec syntax parsing works as expected on Powershell, this is a CMD only issue.

Steps to reproduce

On the Windows platform in a Spack shell

[spack] C:\spack_win\spack> spack spec exodusii ^intel-oneapi-mpi
Input spec
--------------------------------
 -   exodusii

Concretized
--------------------------------
 -   exodusii@2021-04-05%msvc@19.38.33129~fortran~ipo+mpi build_system=cmake build_type=Release generator=ninja arch=windows-windows10.0.22621-AMD64
[e]      ^cmake@3.27.2-msvc1%msvc@19.38.33129~doc~ncurses+ownlibs build_system=generic build_type=Release arch=windows-windows10.0.22621-AMD64
[e]      ^msmpi@10.1.12498.18%msvc@19.38.33129 build_system=generic patches=8bd2593 arch=windows-windows10.0.22621-AMD64
[+]      ^netcdf-c@4.9.2%msvc@19.38.33129+blosc~byterange~dap~fsync~hdf4~ipo~jna+mpi~nczarr_zip+optimize~parallel-netcdf+pic+shared+szip+zstd build_system=cmake build_type=Release generator=ninja patches=0161eb8,151a621,3b09181 arch=windows-windows10.0.22621-AMD64
[+]          ^c-blosc@1.21.5%msvc@19.38.33129+avx2~ipo build_system=cmake build_type=Release generator=ninja arch=windows-windows10.0.22621-AMD64
[e]              ^cmake@3.24.2%msvc@19.38.33129~doc~ncurses+ownlibs build_system=generic build_type=Release arch=windows-windows10.0.22621-AMD64
[+]              ^lz4@1.9.4%msvc@19.38.33129~ipo+pic build_system=cmake build_type=Release generator=ninja libs=shared,static arch=windows-windows10.0.22621-AMD64
[+]              ^snappy@1.1.10%msvc@19.38.33129~ipo+pic+shared build_system=cmake build_type=Release generator=ninja arch=windows-windows10.0.22621-AMD64
[+]          ^hdf5@1.14.3%msvc@19.38.33129~cxx~fortran+hl~ipo~java~map+mpi+shared~subfiling~szip~threadsafe+tools api=default build_system=cmake build_type=Release generator=ninja arch=windows-windows10.0.22621-AMD64
[+]          ^libaec@1.0.6%msvc@19.38.33129~ipo+shared build_system=cmake build_type=Release generator=ninja arch=windows-windows10.0.22621-AMD64
[+]          ^zlib-ng@2.1.5%msvc@19.38.33129+compat~ipo+opt build_system=cmake build_type=Release generator=ninja arch=windows-windows10.0.22621-AMD64
[+]          ^zstd@1.5.5%msvc@19.38.33129~ipo~programs build_system=cmake build_type=Release generator=ninja libs=shared,static arch=windows-windows10.0.22621-AMD64
[e]      ^ninja@1.12.0.git%msvc@19.38.33129~re2c build_system=generic arch=windows-windows10.0.22621-AMD64
[+]      ^python@3.11.6%msvc@19.38.33129+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat~pythoncmd~readline+shared+sqlite3+ssl~tkinter+uuid+zlib build_system=generic patches=13fa8bf,b0615b2,ebdca64,f2fd060 arch=windows-windows10.0.22621-AMD64

Input spec
--------------------------------
 -   intel-oneapi-mpi

Concretized
--------------------------------
[e]  intel-oneapi-mpi@2021.11.0%msvc@19.38.33134+envmods~external-libfabric~generic-names~ilp64 build_system=generic arch=windows-windows10.0.22621-AMD64

Now using multiple layers of escapes:

[spack] C:\spack_win\spack> spack spec "exodusii ^^intel-oneapi-mpi"
Input spec
--------------------------------
 -   exodusii
 -       ^intel-oneapi-mpi

Concretized
--------------------------------
 -   exodusii@2021-04-05%msvc@19.38.33129~fortran~ipo+mpi build_system=cmake build_type=Release generator=ninja arch=windows-windows10.0.22621-AMD64
[e]      ^cmake@3.27.2-msvc1%msvc@19.38.33129~doc~ncurses+ownlibs build_system=generic build_type=Release arch=windows-windows10.0.22621-AMD64
[e]      ^intel-oneapi-mpi@2021.11.0%msvc@19.38.33129+envmods~external-libfabric~generic-names~ilp64 build_system=generic arch=windows-windows10.0.22621-AMD64
 -       ^netcdf-c@4.9.2%msvc@19.38.33129+blosc~byterange~dap~fsync~hdf4~ipo~jna+mpi~nczarr_zip+optimize~parallel-netcdf+pic+shared+szip+zstd build_system=cmake build_type=Release generator=ninja patches=0161eb8,151a621,3b09181 arch=windows-windows10.0.22621-AMD64
[+]          ^c-blosc@1.21.5%msvc@19.38.33129+avx2~ipo build_system=cmake build_type=Release generator=ninja arch=windows-windows10.0.22621-AMD64
[e]              ^cmake@3.24.2%msvc@19.38.33129~doc~ncurses+ownlibs build_system=generic build_type=Release arch=windows-windows10.0.22621-AMD64
[+]              ^lz4@1.9.4%msvc@19.38.33129~ipo+pic build_system=cmake build_type=Release generator=ninja libs=shared,static arch=windows-windows10.0.22621-AMD64
[+]              ^snappy@1.1.10%msvc@19.38.33129~ipo+pic+shared build_system=cmake build_type=Release generator=ninja arch=windows-windows10.0.22621-AMD64
 -           ^hdf5@1.14.3%msvc@19.38.33129~cxx~fortran+hl~ipo~java~map+mpi+shared~subfiling~szip~threadsafe+tools api=default build_system=cmake build_type=Release generator=ninja arch=windows-windows10.0.22621-AMD64
[+]          ^libaec@1.0.6%msvc@19.38.33129~ipo+shared build_system=cmake build_type=Release generator=ninja arch=windows-windows10.0.22621-AMD64
[+]          ^zlib-ng@2.1.5%msvc@19.38.33129+compat~ipo+opt build_system=cmake build_type=Release generator=ninja arch=windows-windows10.0.22621-AMD64
[+]          ^zstd@1.5.5%msvc@19.38.33129~ipo~programs build_system=cmake build_type=Release generator=ninja libs=shared,static arch=windows-windows10.0.22621-AMD64
[e]      ^ninja@1.12.0.git%msvc@19.38.33129~re2c build_system=generic arch=windows-windows10.0.22621-AMD64
[+]      ^python@3.11.6%msvc@19.38.33129+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat~pythoncmd~readline+shared+sqlite3+ssl~tkinter+uuid+zlib build_system=generic patches=13fa8bf,b0615b2,ebdca64,f2fd060 arch=windows-windows10.0.22621-AMD64
Error message

No response

Information on your system
  • Spack: 0.22.0.dev0 (190c0b2f2e1a2e266c7933be9dac622fe91a85f4)
  • Python: 3.11.3
  • Platform: windows-windows10.0.22621-AMD64
  • Concretizer: clingo
General information
  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have searched the issues of this repo and believe this is not a duplicate
  • I have run the failing commands in debug mode and reported the output

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.