-
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
Remote Java tools do not work on Windows (unless it's a clean build) #7440
Comments
cc: @laszlocsomor @lberki |
I have found a fix for this... The current content of my IIUC this is because you can only create symlinks for directories on Windows. Bazel tries to remove all non-symlink directories/files from the execroot tree. On Windows this means that it tries to remove all the files downloaded from my |
Laszlo, it's not blocking 0.23.0. |
Great, thanks! Meanwhile I found out that JavaBuilder_deploy.jar is held open by the java persistent worker, child process of Bazel, which explains why it cannot be deleted. It does not explain though why Bazel tries to delete this file at all -- the second build is a null build after all. Do you have any idea what's going on? |
The error is thrown in the ExecutionTool where it creates a SymlinkForest. The SymlinkForest tries to delete everything in the execroot tree that is not a symlink. I think this part of the code is always executed even on null builds because it's in the execution phase. |
@laszlocsomor Thanks for looking into it! I will mark this issue as fixed since my workaround was submitted and the remote Java tools now work correctly on all platforms. I opened #7458 to keep track of the actual issue that was causing the failure. |
Description of the problem :
bazel 0.22 introduced 2 flags that swtich to using an
http_archive
of tools needed for building Java targets instead of using the same tools embedded into the bazel binary.I succeed to build a Java target on Windows with these flags enabled only after a clean build. When I run the same command again the build fails with:
Probably useful:
JavaBuilder_deploy.jar
.JavaBuilder_deploy.jar
file has write permissionshttp_archive
is declared in jdk.WORKSPACEBugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
The first bazel run should complete successfully, while the second should fail with the above error.
What operating system are you running Bazel on?
Windows 10
What's the output of
bazel info release
?release 0.23.0rc1
Any other information, logs, or outputs that you want to share?
There are some failures on BuildKite as well, for example:
example 1
The text was updated successfully, but these errors were encountered: