bazel: use libxml2 from the BCR#30224
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the Bazel libxml2 dependency from a custom http_archive + wrapper BUILD/headers to a Bazel Central Registry (BCR) module dependency, simplifying third-party maintenance.
Changes:
- Adds
bazel_dep(name = "libxml2", version = "2.15.1")and removes the prioruse_repo-based libxml2 wiring. - Replaces wrapper includes with direct libxml2 headers (
<libxml/parser.h>,<libxml/xmlwriter.h>) and updates Bazel deps to@libxml2. - Removes the custom third-party BUILD file and wrapper headers for libxml2.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
MODULE.bazel |
Adds BCR libxml2 module dep; removes use_repo for the previous non-module libxml2 repo. |
MODULE.bazel.lock |
Locks BCR module resolution for libxml2 (and associated dependency graph changes). |
bazel/repositories.bzl |
Removes the manual http_archive fetch of libxml2. |
bazel/thirdparty/libxml2.BUILD |
Deletes the custom foreign_cc build definition used by the prior http_archive. |
src/v/cloud_storage_clients/xml_sax_parser.h |
Switches to direct <libxml/parser.h> include. |
src/v/cloud_storage_clients/BUILD |
Replaces //src/v/thirdparty/libxml2 with @libxml2 in deps. |
src/v/test_utils/boost_result_redirect.cc |
Switches to direct <libxml/xmlwriter.h> include. |
src/v/test_utils/BUILD |
Replaces //src/v/thirdparty/libxml2 with @libxml2 in implementation deps. |
src/v/thirdparty/libxml2/BUILD |
Removes the local wrapper cc_library target. |
src/v/thirdparty/libxml2/parser.h |
Removes wrapper header. |
src/v/thirdparty/libxml2/xmlwriter.h |
Removes wrapper header. |
4267662 to
4bef018
Compare
|
Rebased on dev and regenerated MODULE.bazel.lock. |
4bef018 to
cd6cf63
Compare
|
Updated to use libxml2 2.15.2 (matching what dev already had) via |
|
Also pushed .2 upstream to BCR, we can switch to that if/when pulled. |
Also updates to 2.15 Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
cd6cf63 to
91756ba
Compare
|
Simplified: libxml2 2.15.2 is now published on BCR (bazelbuild/bazel-central-registry#8453 merged), so we can use it directly via |
CI test resultstest results on build#83394
|
Cherry-pick of the libxml2 commit from #28975, updated to use 2.15.2
(matching the version on dev).
Backports Required
Release Notes