Repository navigation
Closed as not planned
Labels
P3We're not considering working on this, but happy to review a PR. (No assignee)area-WindowsWindows-specific issues and feature requestsstaleIssues or PRs that are stale (no activity for 30 days)team-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websitetype: process
Description
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.
- Website, "Get Bazel" button: make it point directly to the binary.
- Make it so that the user doesn't have to rename the Bazel binary to
bazel.exe.- Done by using the .msi installer, see Windows, release pipeline: build .msi package continuous-integration#745
- Consider turning the downloadable file into an installer: that'd remove the need to rename the binary, to set up the
PATHmanually, and to install the VC runtime DLLs separately. - Website, somewhere near download link: say it's a command line tool, there's no installer. Or: turn Bazel into an installer.
- Website, installation:
- clarify which versions of MSYS Bazel needs. (Any versions, and hopefully not needing for long.)
- Obsolete: Bazel works with any version.
- clarify which versions of VC redistributable DLLs Bazel needs.
- document how to set the PATH
- clarify which versions of MSYS Bazel needs. (Any versions, and hopefully not needing for long.)
- Workspace path may not contain space. Should be supported.
- Renaming the workspace fails because the Bazel server is running in it.
- No VC installed, but Bazel gives warnings (or status messages?) about VC discovery.
- Document {java,py}_binary outputs, the fact that they generate an
.exefile - java_binary:
- Document that deploy jars are self-contained and can be executed with
java -jar foo_deploy.jar - Do not hardcode the JVM's path into the
.exefiles
- Document that deploy jars are self-contained and can be executed with
- Runfiles manifest:
- Review contents of runfiles manifest for data-less java_binaries: probably doesn't need to contain things like the JDK
- The
$0.exe.runfilesdirectory's presence with just a runfiles manifest is weird, not documented anywhere. Consider removing this runfiles directory and just keep the$0.runfiles_manifestfile.
Update(2018-07-03):
-
BAZEL_VCorBAZEL_VSstill 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. - Cryptic error messages when a genrule/sh_* uses
zip, Bazel uses Git Bash, but MSYS is first on the PATH. (Related bug: shell toolchain, design: including common bintools #5265) - Bazel client is slow to extract the embedded binaries. (See Windows: Bazel client is slow #5444)
Reacted by Peter Mounce, Diego Bonura, Edward McFarlane, Darth Binamira, David Given, Jin, Shintaro Takemura, Chris Goy, Craig R Mann and Ofek Lev
Metadata
Metadata
Assignees
Labels
P3We're not considering working on this, but happy to review a PR. (No assignee)area-WindowsWindows-specific issues and feature requestsstaleIssues or PRs that are stale (no activity for 30 days)team-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websitetype: process
Activity
laszlocsomor commentedon May 24, 2018
/cc @meteorcloudy @dslomov @ulfjack
laszlocsomor commentedon Jul 3, 2018
Update(2018-07-03):
BAZEL_VCorBAZEL_VSstill 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)meteorcloudy commentedon Jul 3, 2018
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?
laszlocsomor commentedon Jul 3, 2018
I have a Windows VM on which the auto-detection does not find VC, and I have to manually set the envvar.
meteorcloudy commentedon Jul 3, 2018
Just tested on the VM with 0.15.0. If I build a
sh_binary, it worked without settingBAZEL_VCorBAZEL_VS. If I build a cc_binary, it threw an error asking me to install VC. This is working as expected.But in both case it gives some warning about setting
BAZEL_VC, I guess that what we should improve?laszlocsomor commentedon Jul 3, 2018
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.
meteorcloudy commentedon Jul 3, 2018
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
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxSIt worked on my workstation for VS 2017.
laszlocsomor commentedon Jul 3, 2018
Could you update cc_configure to fall back on checking the default installation path if the registry key is missing?
meteorcloudy commentedon Jul 3, 2018
That's a good idea!
windows_cc_configure.bzl: Check default VC installation directories
windows_cc_configure.bzl: Check default VC installation directories
16 remaining items
ofek commentedon Apr 1, 2020
Any update?
philwo commentedon Apr 2, 2020
@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!
ofek commentedon Apr 2, 2020
Nothing in particular, just curious if the checklist is current
lucasjinreal commentedon Feb 4, 2023
Error in fail: BAZEL_SH environment variable is not set
I cannot bare it anymore in 2023 on windows
github-actions commentedon Apr 10, 2024
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.
github-actions commentedon Jul 9, 2024
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please post
@bazelbuild/triagein a comment here and we'll take a look. Thanks!ofek commentedon Jul 9, 2024
@bazelbuild/triage
meteorcloudy commentedon Jul 9, 2024
I think most of the points in the original issues have been fixed or obsolete. Please file new issue for specific Windows bugs. Thanks!