-
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
http_archive doesn't work well for Windows #7458
Comments
@laszlocsomor Since you are working on |
Is there an easy way to put |
@meteorcloudy : I'm confused -- that build is green. |
@laszlocsomor When running with Bazelisk, the job will continue and be green (because we expect some failures when using incompatible flags). But if check the |
@iirina : How is the
Contents of
We need to repackage this tar and move the .jar files to subdirectories, then update jdk.WORKSPACE, then release Bazel. Is that correct? |
We released the java tools several times after 0.1 (I'm surprised that bazel 0.23 was released with the first version). The java tools versions >= 0.4 have all their content under a |
I don't think this is a regression, so maybe a patch release is not necessary? |
@meteorcloudy Great, then it is already fixed. :) |
@meteorcloudy @laszlocsomor any news on this issue? I'm thinking of adding a top-level |
No updates. |
Oh, that's great! This applies to BUILD files as well, IIUC? |
Yes it does. If no subprocess holds this file open, you're fine. (Jar files and data files of persistent workers are risky.) |
Thanks! |
@iirina : does this bug still matter? It's worth documenting that no file from the root of an archive should be used in a worker, but is there anything beyond that? |
I'll leave it up to the Windows team to decide on the priority/fix. The java rules are not affected by this issue anymore, so from this point of view it doesn't matter. Documenting this behavior is definitely helpful. Depending on what type of archives the Bazel users have this may or may not be an issue in the future. |
Hi there! We're doing a clean up of old issues and will be closing this one. Please reopen if you’d like to discuss anything further. We’ll respond as soon as we have the bandwidth/resources to do so. |
The following scenario is not well supported on Windows:
http_archive
which contains top-level fileshttp_archvie
is invoked by a bazel commandThe bazel command only succeeds if it's a clean build, otherwise fails with an error similar to:
IIUC this is because Bazel tries to remove all non-symlink directories/files from the execroot tree. On Windows there are no symlinks for regular files and bazel uses copies of the original files, so bazel tries to remove all the files downloaded from
http_archive
. If they are already in use by some process (this happens if they were already invoked/used by previous bazel runs) bazel fails to delete them.This issue is a generalization of #7440, which was fixed by placing all top-level files under a directory in the
http_archive
.The text was updated successfully, but these errors were encountered: