-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Revert "build,windows: implement PEP514 python detection" #17293
Conversation
Can you add more detail to the commit log? |
This reverts commit 614dbbd. A subroutine does not work as a replacement for the `python` command since one cannot use a subroutine call in a `for /F` loop. As a workaround, that commit introduced code that calls :run-python just to populate an internal variable, then uses it directly. That sacrifices clarity to support a rare use case and causes surprising behavior when Python is not found. Fixes: #16864
@bnoordhuis done, PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM.
Requesting fast-track since this is a revert. |
Go for it. |
@evanlucas do you approve just the pull request, or also the fast-tracking request?
|
@seishun both, sorry, I should have clarified. +1 to fast tracking |
Thanks, going to land in 24 hours if there are no objections. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the motivation is low nither for a revert of a commit that landed 5 months ago, nor for fast-track.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the motivation is low nither for a revert of a commit that landed 5 months ago, nor for fast-track.
The "rare use case" has been reported by many first time users (nodejs/CTC#147 (comment)), and has not been reported since. P.S. this PR does not CC the relevant parties @nodejs/build @nodejs/platform-windows |
The report you linked looks like hearsay. It might as well have been a misunderstanding. Either way:
That should be fixed. Running tests already requires tools from Git for Windows to be in PATH, so requiring Python as well seems reasonable. |
#17298 has a proposed fix that improves the error message without losing PEP514 detection |
For what it's worth, not a single first timer had issues with git in path (since they typically used git bash to build anyway) - but a few had issues with Python. I'm not expressing an opinion about whether or not Node.js should help users in such cases - it was clear though. |
|
I don't think revert automatically means fast-track.
Isn't that just a case of an unhelpful error message? Python is required to actually build and test node right?
We landed changes to Lines 3 to 12 in 9de15de
I think trying to help users out on Windows is a good thing to do, so I'd rather we fix the issue (e.g. with #17298) than just revert.
Are you saying you think there is no scenario in which this change helps people? |
No, but it means I can request it.
I think we're talking about different things. I'm all for helpful error messages, but going out of our way to locate Python when it's not in |
Okay, I guess I misunderstood what you meant by since (I hadn't seen the latest update to the Collaborator Guide).
If it can be made to work, and it makes life easier for users, and it's not too difficult to maintain, I don't see the harm in it. In my experience people who install things through GUIs (e.g. me before I started using Linux 😁 ) rarely have experience manually modifying their paths, so why not help them? |
It does add a maintenance burden, at least in the current form: #17298 (comment)
The Python installer has an option to add it to PATH. I suppose we could mention that. |
I'm hoping @refack can get #17298 to a point where everyone is happy with it.
Probably, although I think #17046 should make life much easier for people who don't already have it installed. This seems more for people who already have it, but didn't tick that box. |
As in, people who have already been using Python for some time, but somehow never added it to |
Again - this is something that's been happening in practice. I'm fine with mentioning it in the guide, having an FAQ, or taking a different approach than @refack's fix. I'm less fine with fast-tracking non-breaking changes in development setup without giving the collaborator who landed them chance to respond. It's not your fault since you followed protocol - we should probably PR the collaborator guide and amend that. |
The root cause is that the GUI installer does not add python to |
Git for Windows doesn't add Unix tools required for The Boxstarter script in #17046 uses the |
Boxstarter |
I am going to close this since a mentioned alternative has landed. @seishun if this is not correct, please reopen. |
This reverts commit 614dbbd.
Fixes: #16864
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
build