| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
A subroutine does not work as a replacement for the `python` command since one cannot use a subroutine call in a `for /F` loop.
|
CI: https://ci.nodejs.org/job/node-test-pull-request/12247/ cc @nodejs/build @nodejs/platform-windows |
Sorry, something went wrong.
Sorry, something went wrong.
|
|
||
| @rem Generate the VS project. | ||
| call :run-python configure %configure_flags% | ||
| echo configure %configure_flags% |
There was a problem hiding this comment.
%PYTHON% in here would be nice
Sorry, something went wrong.
| "%config%\cctest" %cctest_args% | ||
| :run-test-py | ||
| call :run-python tools\test.py %test_args% | ||
| echo running 'python tools\test.py %test_args%' |
There was a problem hiding this comment.
ditto, running '%PYTHON% ...
Sorry, something went wrong.
|
This approach sgtm, I don't really see the problem here though @seishun:
You have it at the top of the file, just under arg parsing, so any major changes are going to have to be above that line and it's not highly likely those changes would have a use for python above there anyway. To be extra sure you could just add a comment in the file to explain why it's being called so future committers have a warning at least. |
Sorry, something went wrong.
|
@nodejs/collaborators we need to decide whether to merge this PR or #17293. The reasons why I prefer that one are mentioned in OP. That PR has 3 approvals and 1 change request (not sure if it's still relevant? cc @refack), this one has 2 approvals, so the opinions seem divided. |
Sorry, something went wrong.
|
@bzoz If you mean the scenario where Python is installed but not added to PATH, then it doesn't work too well - it prints some error messages before proceeding with the build, then leaks PATH modifications to the cmd session: C:\node>python 'python' is not recognized as an internal or external command, operable program or batch file. C:\node>vcbuild ERROR: The system was unable to find the specified registry key or value. ERROR: The system was unable to find the specified registry key or value. Looking for Visual Studio 2017 calling: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\\Auxiliary\Build\vcvarsall.bat" amd64 ^CTerminate batch job (Y/N)? y C:\node>python Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. Since no one has reported these issues, I suspect very few people, if any, rely on this scenario. |
Sorry, something went wrong.
|
#17015 will fix the error messages, PATH leak could be fixed also. I guess we do not get reports, because after all compilation works, and those error messages are covered by miles of compilation output. Since the code is already here, it works, and it is not a chore to maintain I don't see a reason to drop a supported scenario. |
Sorry, something went wrong.
It does carry a maintenance burden as explained in OP. Whether it's greater than the usefulness of this scenario is subjective, so we probably won't convince each other. Unless TSC chimes in, I'll just land the PR that gains more approvals. |
Sorry, something went wrong.
|
The other PR has -1 from @refack, so only this PR can land. |
Sorry, something went wrong.
|
There was a lot of discussion after he requested changes. I asked him if it's still relevant in #17293 (comment) and didn't get a response. |
Sorry, something went wrong.
|
I think it is still relevant and I'm also -1 for that PR. If you trace #13900 it is a fix for a real issue described in nodejs/CTC#147 (comment). |
Sorry, something went wrong.
|
@seishun would you be so kind and address the comments? As soon as that is done I would go ahead and land this. |
Sorry, something went wrong.
|
I am going to close this since a mentioned alternative has landed. @seishun if this is not correct, please reopen. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
A subroutine does not work as a replacement for the python command
since one cannot use a subroutine call in a for /F loop.
Similarly to #17298 and #17015, this introduces a maintenance burden: namely, whenever significant changes are introduced in vcbuild.bat, one has to make sure find_python.cmd is called before the first Python usage. Consequently, I would prefer #17293 to be landed instead.
Checklist
Affected core subsystem(s)
build