https://pantsbuild.org/ logo
#general
Title
# general
b

bland-yak-74764

04/06/2022, 5:33 PM
Hey guys. It looks like the pex files are not designed to work on Windows. Is that still current? Does that means pants cannot work natively on Windows? (If a project requires Windows development, does that mean I'm stuck with Bazel?)
h

happy-kitchen-89482

04/06/2022, 5:39 PM
Short answer is: unfortunately yes. It all should work fine under WSL2, but we cannot build native Windows pexes at this time.
Long answer: It may be possible to build pexes on linux that include windows-compatible wheels (assuming all those are published) and that can be expanded into a venv on windows via external scripting
But I have no experience with Windows so I cannot say what the pitfalls might be
e

enough-analyst-54434

04/06/2022, 6:12 PM
And there are more (solvable) problems than just Pexes. The core Pants engine would need to be built for Windows, we'd need to tackle the symlinks it uses for some primitives, etc.
h

happy-kitchen-89482

04/06/2022, 6:14 PM
Yeah, I was just thinking, as a hack, of building on Linux pexes that might be usable on Windows with some extra hackery
@bland-yak-74764 if you were asking about developers building pexes on Windows by running Pants or Pex on that platform directly, then that is work we have not even begun to look at, and I have no knowledge of how much work it would be (likely "a lot")...
b

bland-yak-74764

04/06/2022, 6:35 PM
Basically, some projects use python dependencies that only work on windows, so a portion of the development has a hard requirement on Windows OS. I think Bazel might be cross-platform, the syntax just looks uglier.
h

happy-kitchen-89482

04/06/2022, 7:06 PM
So the code has to run on Windows, but does Pants itself have to run on Windows? Because you could, for example, build windows-compatible wheels by running Pants on linux (assuming any native code requirements have prebuilt Windows wheels published)
e

enough-analyst-54434

04/06/2022, 7:09 PM
Even if that worked it would be pretty restrictive. Couldn't run tests that tested code that used those requirements.
b

bland-yak-74764

04/06/2022, 7:17 PM
Sidenote: I'm also noticing that on WSL, after I run any pants commands, I seem to loose the ability to do things like change directory names. (It claims the file is open somewhere else, even after I close VSCode and any open WSL terminals.) I can't edit the content without rebooting the system.
e

enough-analyst-54434

04/06/2022, 7:43 PM
Yeah. Unfortunately, to the extent Pants or Pex work at all on Windows, even under WSL, it's just pure luck. We have no CI set up for either on Windows and no current contributors for either with Windows machines (technically a lie, I can now dual boot to Windows, but I've spent no time yet).
5 Views