Rules_go tests are failing on Windows with Bazel 1.0
See original GitHub issuehttps://buildkite.com/bazel/rules-go-golang/builds/1491
Executing tests from //tests/legacy/examples/stamped_bin:stamped_test
-----------------------------------------------------------------------------
--- FAIL: TestBuild (1.83s)
stamped_test.go:101: Starting local Bazel server and connecting to it...
Server crashed during startup. Now printing c:\users\b\_bazel_b\ibnjdh6i\server\jvm.out
I/O Error: C:/users/b/_bazel_b/ibnjdh6i/server/server_info.rawproto.tmp -> C:/users/b/_bazel_b/ibnjdh6i/server/server_info.rawproto (Permission denied)
exit status 37
--- FAIL: TestBuildWithoutStamp (1.83s)
stamped_test.go:111: expected tests to have failed (instead got exit code 37)
FAIL
cleanup error: remove D:\b\jylqiqkr\bazel_testing\bazel_go_test\main: The process cannot access the file because it is being used by another process
Bazel 1.0 crashes inside the test due to some permission denied error.
We didn’t catch this in downstream test because the rules_go tests invoke bazel
from PATH
. On CI, it would actually be Bazelisk, but Bazelisk always points to the latest stable version instead of using Bazel@HEAD.
Issue Analytics
- State:
- Created 4 years ago
- Comments:23 (17 by maintainers)
Top Results From Across the Web
Using Bazel on Windows
When built on Windows, these rules do not require Bash. Using bazel test without Bash. Bazel versions before 1.0 used to require Bash...
Read more >一步步学写Bazel lib&rules (2) - 写一个简单的go rules - 后端云
上面的WORKSPACE调用下面的deps.bzl,在deps.bzl用内置的方法http_archive引入bazel基础库Skylib依赖. deps.bzl """Macro for declaring repository ...
Read more >Build from source on Windows - Install - TensorFlow
Install Bazel, the build tool used to compile TensorFlow. For Bazel version, see the tested build configurations for Windows. Configure Bazel to build...
Read more >Bazel installation on windows - Stack Overflow
Whenever I run the command bazel build it shows an error saying that it only works from workspace. I don't know how to...
Read more >Bazel & Go Tutorial: Targets with go_library ... - YouTube
Bazel is a build tool that is very popular for use in monorepos. ... Bazel & NodeJS Tutorial: library, test & nodejs_binary (internal ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I too can run bazel, you have to run an actual command, like build or clean.
Edit: clean seems to work though…
Edit 2: Hmm… after running clean, it seems like it is working again. I will keep investigating if it has something todo with first running 0.29.1, then 1.1.0
So currently, we set
USE_BAZEL_VERSION=D:\temp\tmpzmgcwe5d\bazel-bin\src\bazel.exe
for downstream pipeline. If you just invoke Bazel from path, Bazelisk will correctly invoke the bazel binary being tested. You don’t have to do anything now. 😃