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

Handle safe_copy failing to hardlink on Windows due to too many existing links #2394

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

akrieger
Copy link

@akrieger akrieger commented Apr 2, 2024

Windows does support hard links, and os.link() supports Windows as of Python 3.2. There is a specific error that can be thrown on Windows when you try to create too many hardlinks to a file. Handle that case explicitly in its own test. It's more precise than trying to infer an errno for it which may be mapped to by various kinds of errors.

@jsirois
Copy link
Member

jsirois commented Apr 11, 2024

@akrieger thanks for the effort here. Much more is required however. In short, Pex does not support Windows yet. There is more recent commentary here: #259 (comment) but one very broken thing is file locking which Pex relies on in its cache handling. That is currently Posix-only. There are many other issues though, including handling venv .exe console script wrappers and more.

My basic stance is that I need green CI on a platform to support that platform. We don't have CI setup for Windows yet. I put a fair chunk of effort towards this in https://github.com/jsirois/pex/tree/Windows/wip ~2 years ago. I'm picking that up again, but you'll truly know when Pex supports Windows by looking here in the "Operating System" section: https://pypi.org/project/pex/ (or here:

pex/pyproject.toml

Lines 38 to 40 in 1921ba4

"Operating System :: Unix",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
)

@akrieger
Copy link
Author

Well, I wrote this because it fixed an issue we were having and I wanted to make sure no one else it hit too. When the project is ready to merge this, it'll be available.

@jsirois
Copy link
Member

jsirois commented Apr 12, 2024

Thanks. I'll make sure to include this in the initial Windows support release.

Well, I wrote this because it fixed an issue we were having and I wanted to make sure no one else it hit too.

The thing is, no one at all should be using Pex on Windows right now. I can't support it sanely without (green) CI or a Windows-using prospective Pex user providing that green CI baseline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants