commit | 08c5171a258e32300917092730b73b3bc72d0426 | [log] [tgz] |
---|---|---|
author | jhorvitz <jhorvitz@google.com> | Mon May 10 14:13:31 2021 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Mon May 10 14:14:38 2021 -0700 |
tree | e76bba030064053ab9ef352395d3a432cb68d931 | |
parent | 8dae10f250640064803499a757c930e142b300ec [diff] |
Fix memory leak in `BuildOptionsCache`. `ExecutionTranisitionFactory` and `PythonVersionTransition` always seem to get "initialized" (checksum computed) `BuildOptions` instances in practice, so there's no penalty for using the checksum instead of reference equality for the cache key. This also has the advantage of sharing cache mappings across equivalent `BuildOptions` instances. `TestTrimmingTransitionFactory` on the other hand does get "uninitialized" `BuildOptions` instances in practice. Since it doesn't use an additional context object anyway, it was easy to just use a weak key/value `Cache<BuildOptions, BuildOptions>` and keep the reference equality semantics. PiperOrigin-RevId: 373009686
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only 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