Skip to content

android toolchain: add the missing xmllint tool#514

Open
06393993 wants to merge 1 commit into
bazelbuild:mainfrom
06393993:fix_xmllint
Open

android toolchain: add the missing xmllint tool#514
06393993 wants to merge 1 commit into
bazelbuild:mainfrom
06393993:fix_xmllint

Conversation

@06393993
Copy link
Copy Markdown
Contributor

@06393993 06393993 commented Jun 3, 2026

It's used by the android_feature_module rule defined at rules/android_application/android_feature_module_rule.bzl to check if the manifest file is valid.

Comment thread toolchains/android/BUILD Outdated
name = "gen_xmllint",
outs = ["xmllint.sh"],
cmd = """cat > $@ <<EOF
xmllint \\$$@
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no guarantee that xmllint is installed on all user machines, so this has to come from some kind of repo rule or compatibility shim binary.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did some quick research. libxml2 is already on the BCR: https://registry.bazel.build/modules/libxml2

And xmllint can be depended on via @libxml2//:xmllint.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For bzlmod, added libxml2 from BCR and use @libxml2//:xmllint.

For WORKSPACE, added http_archive invocation for libxml2, and checked in the BCR overlay files. PTAL, thanks.

@06393993 06393993 force-pushed the fix_xmllint branch 2 times, most recently from cbb864b to e1cc387 Compare June 3, 2026 22:08
It's used by the `android_feature_module` rule defined at
`rules/android_application/android_feature_module_rule.bzl` to check if
the manifest file is valid.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants