Here's a question I never thought about too much -...
# general
w
Here's a question I never thought about too much - does Pex work on Windows?
b
Not yet, but John has been looking into it. There's been updates
w
👍 What about in WSL2? I would assume it "should" work there?
b
I suspect so, but don't quote me
c
I think there are subtle issues with it, but don’t quote me either 😛
h
It works in WSL2 (so does Pants!)
@enough-analyst-54434 has been working on getting pex to work on Windows
e
Yeah, Pex works on Windows in a branch save for ~50 unit tests. All the ITs now pass. Python 3.8+
And I hack on Pex currently mainly in Windows and WSL2, flipping back and forth.
The thing about WSL is its a pretty horrible experience unless you stay isolated to WSL. The file sharing back to WIndows is over plan9 fs and its super laggy.
w
All the ITs now pass. Python 3.8+
Oooh, dope!
The file sharing back to WIndows is over plan9 fs and its super laggy
I recall this in another slack thread with the pants daemon being off as somehow the workaround.
e
This is just Pex hacking, no Pants in sight. Things are super slow if you work across
/mnt/c
/
\\wsl\
boundaries.
w
Yep, thats' cool - I just found out that some of the devs I'm working with are using Windows machines sometimes, so trying to see if I can bundle a pex for them (someday)
s
What’s the latest on having Windows support? I think this may be the problem I’m facing 🙂
Copy code
build (3.9, windows-latest)
failed Jan 5, 2023 in 27s
3s
12s
0s
7s
Run pantsbuild/actions/init-pants@main
Run actions/setup-python@v4
Installed versions
Run if ! grep 'PANTS_BOOTSTRAP_TOOLS' ./pants > /dev/null; then
Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp.ItiVb2qQjM'
Run actions/cache@v3
Cache not found for input keys: pants-setup-os_name=MINGW64_NT-10.0-20348 arch=x86_64 python_path=/c/hostedtoolcache/windows/Python/3.9.13/x64/python3 python_executable_path=C:\hostedtoolcache\windows\Python\3.9.13\x64\python.exe python_version=Python 3.9.13 pex_version=2.1.103 virtualenv_requirements_sha256= pants_version=2.14.0
Run actions/cache@v3
Cache not found for input keys: pants-named-caches-Windows-cache0-py3.9-b07bcbf1c6494027f83bfe32d7d8d9b5ebfbeb80c1f50ceb8d3e670af0f78c53-, pants-named-caches-Windows-cache0-py3.9-b07bcbf1c6494027f83bfe32d7d8d9b5ebfbeb80c1f50ceb8d3e670af0f78c53-, pants-named-caches-Windows-cache0-py3.9-
Run if [ "${PANTS_CONFIG_FILES}" == "DEFAULT" ]; then
NOT setting PANTS_CONFIG_FILES by default
because pants.ci.toml does not exist.
Run ./pants --version
Bootstrapping Pants using /c/hostedtoolcache/windows/Python/3.9.13/x64/python3
Creating the virtualenv PEX.
Downloading the Pex PEX.
Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
FileNotFoundError: [Errno 2] No such file or directory: '/c/Users/runneradmin/.cache/pants/setup/bootstrap-MINGW64_NT-10.0-20348-x86_64/pants.7tMo0u/pex'
SHA256 of <https://github.com/pantsbuild/pex/releases/download/v2.1.103/pex> is not as expected. Aborting.
Error: Process completed with exit code 1.
h
We're working on pex support for Windows, it's a work-in-progress, but there has been a lot of progress
🙌 1
s
Great!
e
PEX support for Windows doesn't mean Pants support for Windows. IIUC no one is looking at Pants own Windows issues yet seriously; so Pants support should be considered far out. You'll need to use WSL and only use clones in WSL, no /mnt/c !
s
Aha.. @enough-analyst-54434 thanks for the clarification 🙂