-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Windows: don't shell out to cmd.exe
#2190
Comments
This issue is actually blocking #2181 . |
P2, because there is a workaround: use You can even create a virtual drive:
then just use |
Re: #2190 (comment) and The |
Isn't this rather a bug? |
Generally don't use cmd, because MS announced that they will (finally!!) be deprecating it (over some time): http://www.osnews.com/story/29502/Microsoft_replaces_cmd_with_PowerShell_in_new_Windows_10_build |
@petemounce : AIUI they aren't deprecating cmd, just making it non-default. So cmd will be around... *in ghastly voice* foreveeeeeeer. |
Sure. Still don't use it. :p |
Powershell is very very slow to start (as in, >10x slower than cmd.exe as @philwo measured) |
Another reason to not shell out to |
This is the only non-test place I found where Bazel shells out to
I have a hunch (that I need to verify) that you can bazel/src/main/java/com/google/devtools/build/lib/util/CommandBuilder.java Lines 146 to 147 in b874254
|
See bazelbuild#2190 Change-Id: If665af264a23be0219c75ae087dd25db74d5e386
See bazelbuild#2190 Change-Id: If665af264a23be0219c75ae087dd25db74d5e386
Remove the .useShell method, expect callers to just pass the shell interpreter if they need it. This removes the argument vector transformation heuristic, and stops shelling out to cmd.exe on Windows. See bazelbuild#2190 Also remove the .setWorkingDir method because callers always had to set the working directory. Instead, the CommandBuilder constructor takes the working directory. Change-Id: I545e01c811daaf34913cb585492923da81aa02ee
Apparently the |
Other than bazel/tools/android/junction.py Line 89 in acb1bd1
These are the only two locations I'm aware of. (And some more in Bazel's own tests.) |
I'm not sure if this bug is really that big of a deal:
|
Because of #2190 (comment), I'm marking it as P4. |
Closing for the reasons mentioned above. |
Description of the problem / feature request / question:
cmd.exe
doesn't support UNC paths so we can't shell out to tools through it and use long paths.Example where this occurs:
WindowsFileSystem.createDirectoryJunction
Related issue: #2181
Environment info
The text was updated successfully, but these errors were encountered: