commit | 5400753c2f5b9c3b153def35ebd33d25a06dfd0d | [log] [tgz] |
---|---|---|
author | Yun Peng <pcloudy@google.com> | Wed Feb 20 05:21:11 2019 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Wed Feb 20 05:23:01 2019 -0800 |
tree | f25cc47ae2e6b4a94e4b67b5da8b863d4c285b2d | |
parent | 714e3f2eebae97cd994ddf89627767fe2a86a16e [diff] |
Windows: Fix deleting directory in JNI code `bazel clean` command sometimes fails on Windows with "Directory not empty" error. But when checking the directory after the failure, we don't see any file or directory under it. After debugging, we cannot find any unclosed file handle, either. However, when trying to delete the bazel output directory with `rm -rf" it succeeds everytime. The reason is that Cygwin worked around a Windows issue at this commit: https://github.com/Alexpux/Cygwin/commit/28fa2a72f810670a0562ea061461552840f5eb70 The problem is, I quote: "" Intensive testing shows that sometimes directories, for which the delete disposition has already been set, and the deleting handle is already closed, can linger in the parent dir for a couple of ms for no apparent reason (Windows Defender or other real-time scanners are suspect). "" In this commit, we use a similar way to retry deleting the directory when its "deleted" sub-dirs are still lingering under it. Related https://github.com/bazelbuild/bazel/issues/5907 Closes #7462. PiperOrigin-RevId: 234777436
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel only rebuilds what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
See CONTRIBUTING.md
Bazel is released in ‘Beta’. See the product roadmap to learn about the path toward a stable 1.0 release.