-
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
Bazel on Windows: improve first-time experience #5254
Comments
Update(2018-07-03):
|
If users don't define BAZEL_VC and BAZEL_VS, Bazel will detect VC installation on the machine, if not found a fake crosstool will be generated. So I guess they are not mandatory, are they? |
I have a Windows VM on which the auto-detection does not find VC, and I have to manually set the envvar. |
Just tested on the VM with 0.15.0. If I build a
|
Thanks for looking into this!
For me too. That is WAI.
For me too, and this is my primary concern. Isn't the cc_toolchain supposed to discover where VC is installed?
That's an annoyance because it spams the output and the yellow-colored DEBUG messages look like warnings, but this is only my secondary concern. |
Hmm, I see VS 2017 is installed on the VM, but the registry info is somehow missing. Normally, bazel should be able to detect that through registry by |
Could you update cc_configure to fall back on checking the default installation path if the registry key is missing? |
That's a good idea! |
See #5254 (comment) RELNOTES: None PiperOrigin-RevId: 203273587
See bazelbuild#5254 (comment) RELNOTES: None PiperOrigin-RevId: 203273587
Want to add one issue I've encountered while following the java tutorial on Windows 10.
|
@darthbinamira |
On Windows cmd.exe terminal, we should use double quote, and \ cannot be used to separate lines. Addressing #5254 (comment) RELNOTES: Note PiperOrigin-RevId: 211087172
Need to verify this (I'm on my Chromebook right now), but I think under windows "bazel.exe" actually runs "java.exe" (as expected), but unlike Linux, the name still comes as "java" during "tasklist" or "pslist" (from Sys Internals). Probably all it takes to rename "java.exe" to "bazel.exe", and then it can be killed. Again need to verify this next week, when I have windows machine again! |
True, it's "java.exe" in Task Manager. @philwo : WDYT of renaming the embedded JDK's java.exe to bazel-server.exe or something? |
Quite a hack, but yeah, why not 😅 It would get confusing if we ever used the embedded JDK to run something other than the Bazel server, but I don't think that should happen anymore (@meisterT maybe knows?). |
I like this. "Java? Who is Java? I am Bazel Server!" |
We should not run anything else than Bazel itself on the embedded JDK anymore, so feel free to rename (or symlink). |
Thanks for the feedback! |
Updated the OP with current status. |
Rest of the stuff won't get done before 1.0, removing tag. |
Any update? |
@ofek Are you looking for something specific? Recently, we've been doing some light improvements for Bazel's Windows port, but are not prioritizing it very highly, because we feel like it's currently working well enough for the known users. But if you have concrete issues that we should address, please let me know here and I'll make sure we look at them! |
Nothing in particular, just curious if the checklist is current |
Error in fail: BAZEL_SH environment variable is not set I cannot bare it anymore in 2023 on windows |
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale. |
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please post |
@bazelbuild/triage |
I think most of the points in the original issues have been fixed or obsolete. Please file new issue for specific Windows bugs. Thanks! |
In the spirit of #5208, I'd like to collect ideas to improve the experience of first-time Bazel on Windows users. Some ideas may be Windows-specific, some may cover all platforms. I believe the experience is bumpier than it could be.
I'm opening this bug with the intent of collecting these ideas -- mine and everyone else's -- and use it as a burn-down list of improvements. Please feel free to add your ideas. I'll keep updating the list as tasks are completed.
bazel.exe
.PATH
manually, and to install the VC runtime DLLs separately..exe
filejava -jar foo_deploy.jar
.exe
files$0.exe.runfiles
directory's presence with just a runfiles manifest is weird, not documented anywhere. Consider removing this runfiles directory and just keep the$0.runfiles_manifest
file.Update(2018-07-03):
BAZEL_VC
orBAZEL_VS
still needs to be defined (at least on my GCP Windows VM -- maybe I'm not admin?). An installer could do this so the user doesn't have to.zip
, Bazel uses Git Bash, but MSYS is first on the PATH. (Related bug: shell toolchain, design: including common bintools #5265)The text was updated successfully, but these errors were encountered: