| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
/cc @nodejs/build @nodejs/platform-windows |
Sorry, something went wrong.
Will it still be relevant once #16969 is merged? |
Sorry, something went wrong.
|
Yes |
Sorry, something went wrong.
There was a problem hiding this comment.
Can we keep this. Or upstream to https://github.com/node4good/msvs-com-helper
Sorry, something went wrong.
There was a problem hiding this comment.
This removes that message, making output look nicer for VS2015 compilation.
Sorry, something went wrong.
There was a problem hiding this comment.
we just dropped "official" VS2015 support 🤷♂️
If you still want to keep output clean, I'd rather you change the call in vcbuild
Line 199 in d217b28
if defined DEBUG_HELPER (call tools\msvs\vswhere_usability_wrapper.cmd)
else (call tools\msvs\vswhere_usability_wrapper.cmd > nul)
Sorry, something went wrong.
There was a problem hiding this comment.
If you still want to keep output clean, I'd rather you change the call in vcbuild
I'd prefer to keep vcbuild clean too.
Sorry, something went wrong.
There was a problem hiding this comment.
Even without 2015, if no VS2017 is found, it will look like this:
Looking for Visual Studio 2017
could not find "vswhere"
Failed to find a suitable Visual Studio installation.
Try to run in a "Developer Command Prompt" or consult
https://github.com/nodejs/node/blob/master/BUILDING.md#windows-1I don't think it looks good, and the could not find "vswhere" is only helpful if you know vcbuild internals. We can use DEBUG_HELPER to debug vcbuild if needed.
Sorry, something went wrong.
There was a problem hiding this comment.
Ok, I'll move it upstream.
Sorry, something went wrong.
There was a problem hiding this comment.
YAASS! (I have this floating in all my workspaces, and I keep forgetting to upstream it)
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry, something went wrong.
There was a problem hiding this comment.
Agree, let's not duplicate the validation.
Sorry, something went wrong.
There was a problem hiding this comment.
:run-python is very verbose, especially if no Python is found (see #16864). Stdout and stderr is redirected to nul, to keep it clean.
Sorry, something went wrong.
There was a problem hiding this comment.
Then maybe :run-python should be fixed. I was planning to do it myself, I think it's a simple error in the code.
Sorry, something went wrong.
|
Updated, PTAL |
Sorry, something went wrong.
There was a problem hiding this comment.
This is ugly. Basically, we run tools\getnodeversion.py, ignore the output, exit if it failed, then run it again, this time directly using a variable that's supposed to be internal to find_python.cmd.
Sorry, something went wrong.
There was a problem hiding this comment.
could change the fake call to call :run-python --version
Sorry, something went wrong.
There was a problem hiding this comment.
It would still be a hacky workaround for the limitation of run-python.
Sorry, something went wrong.
There was a problem hiding this comment.
No argument here. This file has a lot of cmdism hacks, mainly because you can't redirect stdout into a variable.
I'll check if there's a way to use call as the for command.
Sorry, something went wrong.
There was a problem hiding this comment.
I've checked before, there isn't. So a subroutine doesn't work as a replacement for the python command.
An alternative would be to replace run-python with find-python that would just populate a variable to be used instead of python. But then one would have to make sure that find-python is run before the first usage of Python and that it's not run if Python isn't needed, whenever a significant change is introduced into vcbuild.bat.
Honestly, I'd prefer to just revert 614dbbd since it introduces a lot of complexity in order to support an edge case that has never affected anyone to my knowledge. IMO it was landed prematurely (only one approval and not thoroughly tested).
Sorry, something went wrong.
|
Updated, PTAL. |
Sorry, something went wrong.
|
ping? |
Sorry, something went wrong.
|
Unfortunately, my comment in #17298 (comment) applies here as well, so I cannot approve this. |
Sorry, something went wrong.
There was a problem hiding this comment.
Not the resident domain expert but LGTM, FWIW.
Sorry, something went wrong.
|
@seishun it does not fix all issues, but at least makes vcbuild slightly more user friendly without breaking anything. IMO it will be better to wait for proper python fix with this version, rather that the one from master. |
Sorry, something went wrong.
|
If nobody oposes, I will land this tomorrow |
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry, something went wrong.
Removes extra erroor messages when Python is not installed. Removes "vswhere not found" message when no VS2017 installation is found. Adds support for DEBUG_HELPER to vcbuild.bat. Fixes: nodejs#16864
Sorry, something went wrong.
| call tools\msvs\find_python.cmd | ||
| if errorlevel 1 echo Could not find python2 & goto :exit | ||
| echo Looking for Python 2.x | ||
| call tools\msvs\find_python.cmd > NUL 2> NUL |
There was a problem hiding this comment.
Can the noise not be fixed inside find_python.cmd itself?
Sorry, something went wrong.
| if errorlevel 1 echo Could not find python2 & goto :exit | ||
| echo Looking for Python 2.x | ||
| call tools\msvs\find_python.cmd > NUL 2> NUL | ||
| if errorlevel 1 echo Could not find Python installation & goto :exit |
There was a problem hiding this comment.
I'd drop "installation".
Sorry, something went wrong.
|
Updated, PTAL. |
Sorry, something went wrong.
|
I've moved error messages to find_python.cmd. This way we can have special error message when we find Python, but the version is incorrect. |
Sorry, something went wrong.
|
CI after update: https://ci.nodejs.org/job/node-test-pull-request/13300/ Can I get +1? |
Sorry, something went wrong.
|
I don't really see the point in separating error messages for "No Python found at all" and "Python 2.x specifically not found". Isn't the action to be taken by the user the same in both cases? |
Sorry, something went wrong.
|
Its mostly for the new people, like in Code + Learn, etc. If they have Python 3 installed, vcbuild complaining about "no python" will be confusing for some people. Telling them "I've found python but the version is wrong" makes it clear whats the problem. |
Sorry, something went wrong.
There was a problem hiding this comment.
Generally LGTM, but would be good to get another review from @nodejs/platform-windows
Sorry, something went wrong.
I'd say "No Python 2.x" is sufficient for both cases. Mentioning a Python 3.x installation seems excessive, it's just a different product (i.e. you can have both installed). |
Sorry, something went wrong.
|
Sure, saying "you don't have python2.x" is sufficient. But saying "you have wrong python version" is more helpful. |
Sorry, something went wrong.
|
It's also misleading because it suggests it should be replaced with python 2.x. |
Sorry, something went wrong.
In that case wouldn't the answer be to be more specific rather than less, i.e. something like:
? |
Sorry, something went wrong.
|
It will say Python found in [...], but it is not v2.x.. Again, this is to help out new people on the project, like in Code + Learn. The more info we provide the better. And easier for people running such workshops to get everyone started with developing Node. I would like to land this, @seishun are you -1 on this? |
Sorry, something went wrong.
|
I can't imagine a situation where this extra info would help new people. If anything, it's confusing because they might think they should uninstall Python 3.x. I'm -0 on this. |
Sorry, something went wrong.
|
I'm gonna land this then. |
Sorry, something went wrong.
Removes extra erroor messages when Python is not installed. Removes "vswhere not found" message when no VS2017 installation is found. Adds support for DEBUG_HELPER to vcbuild.bat. Fixes: #16864 PR-URL: #17015 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Removes extra erroor messages when Python is not installed. Removes "vswhere not found" message when no VS2017 installation is found. Adds support for DEBUG_HELPER to vcbuild.bat. Fixes: nodejs#16864 PR-URL: nodejs#17015 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Removes extra erroor messages when Python is not installed. Removes "vswhere not found" message when no VS2017 installation is found. Adds support for DEBUG_HELPER to vcbuild.bat. Fixes: #16864 PR-URL: #17015 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Removes extra erroor messages when Python is not installed. Removes "vswhere not found" message when no VS2017 installation is found. Adds support for DEBUG_HELPER to vcbuild.bat. Fixes: nodejs#16864 PR-URL: nodejs#17015 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
|
Should this be backported to v8.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Adds extra a check for proper Python version. If it is not found, vcbuild will exit early.
If no VS2017 installation is found, vswhere_usability_wrapper.cmd would print could not find "vswhere". This removes that message, making output look nicer for VS2015 compilation.
Finally, this adds support for DEBUG_HELPER to vcbuild.bat. Similar to vswhere_usability_wrapper.cmd and find_python.cmd, if DEBUG_HELPER environment variable is set, echo off will not be called, making debugging easier.
Fixes: #16864
Checklist
Affected core subsystem(s)
build