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

Pin Python to 3.11 to work around zui/2882 #2883

Merged
merged 3 commits into from
Nov 7, 2023
Merged

Conversation

philrz
Copy link
Contributor

@philrz philrz commented Nov 7, 2023

#2882 (comment) has background.

At first I tried the workaround python3 -m pip install packaging that's discussed most frequently at nodejs/node-gyp#2869. My first Dev build with that workaround came out fine on macOS. I then thought it'd be good to add a comment in the Actions YAML mentioning it's a workaround for this issue. Out of pure paranoia, I made yet another Dev build and that one failed with the same No module named 'distutils' on macOS that started this all. I can't explain what was going on there since the run log shows it successfully running the python3 -m pip install packaging just like in the prior working build. 🤷‍♂️

Rather than try to understand if that workaround was somehow unreliable, I peeked at some of the other links in nodejs/node-gyp#2869 where people work around the problem in their own projects. I saw someone doing something that I now realize makes more sense and is what I'm doing in this PR: Pinning the Python version to 3.11. With my paranoia in full effect, I made three test builds this time (1, 2, 3). None of them showed the No module named 'distutils' failure, so that seems to indicate the workaround of using Python 3.11 is effective as we'd hope. However, the second of the three builds happened to fail with the separate symptom FetchError: request to https://www.electronjs.org/headers/v22.3.25/SHASUMS256.txt failed, reason: read ECONNRESET that I'd previously only seen on Linux as mentioned in #2882 (comment).

Conclusion: It seems like it must be down to particularly bad luck, but I've shown this all to @jameskerr and we are in agreement that it looks like we've been plagued by two separate problems that both happen to affect this node-pipe dependency. We've actually known about exposure here for 3+ years (#1165) but it's only just now been biting us in a big way. @jameskerr is looking at a fix for the general problem of making sure the overall build fails if node-pipe doesn't build successfully on macOS and Linux. In the meantime, this PR should address the problem that was always causing node-pipe to not build on macOS due when the GitHub Actions runners started using Python 3.12 by default.

@philrz philrz requested a review from jameskerr November 7, 2023 00:41
@philrz philrz self-assigned this Nov 7, 2023
@philrz philrz merged commit d29e674 into main Nov 7, 2023
12 checks passed
@philrz philrz deleted the fix-node-gyp-python branch November 7, 2023 18:47
@philrz philrz linked an issue Nov 7, 2023 that may be closed by this pull request
nwt added a commit that referenced this pull request Jan 8, 2024
This reverts commit d29e674.

Reason for revert: #2956 removed the node-pipe dependency so this
workaround for #2882 is no longer necessary.
nwt added a commit that referenced this pull request Jan 8, 2024
This reverts commit d29e674.

Reason for revert: #2956 removed the node-pipe dependency so this
workaround for #2882 is no longer necessary.
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.

Failure to launch Zed service
2 participants