Skip to content

fix(map): raise android-maps-utils to 5.1.1 so KML import survives xmlutil 1.0.x - #6811

Merged
jamesarich merged 1 commit into
mainfrom
fix/kml-xmlutil-linkage
Aug 21, 2026
Merged

fix(map): raise android-maps-utils to 5.1.1 so KML import survives xmlutil 1.0.x#6811
jamesarich merged 1 commit into
mainfrom
fix/kml-xmlutil-linkage

Conversation

@jamesarich

@jamesarich jamesarich commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Every KML/KMZ custom-overlay import on the google flavor has crashed with a fatal NoSuchMethodError since 2.8.0 (Crashlytics issue ac7ca3a7da92ca90d730d96f17b8148b — the app's #1 FATAL by event count on 2.8.1, and repetitive: users retry the import ~5x each). This fixes it while keeping the app on the latest xmlutil.

Root cause. The transitive android-maps-utils-data:5.0.0 (via maps-compose 8.4.0 → maps-utils-ktx 6.2.0) is compiled against xmlutil 0.91.x's XmlConfig.Builder.policyBuilder(), which xmlutil 1.0.0 removed. The app has shipped xmlutil 1.0.x for its CoT XML since the Renovate major bump (#5998, first released in 2.8.0), and in conflict resolution the app's 1.0.x wins over data-5.0.0's 0.91.3 request — so KmlParser's lazy XML-config init throws on first use, every time. Verified by inspecting the published bytecode of each artifact.

🐛 Bug Fixes

  • Declare com.google.maps.android:android-maps-utils:5.1.1 directly (google flavor), raising the whole 5.0.0 submodule set. Upstream fixed the parser in 5.1.1 (2026-08-11): its KmlParser uses xmlutil 1.0.x's XmlConfig.CompatBuilder.policyBuilder(), which is present in the 1.0.2 the app ships. xmlutil itself is untouched.
  • Not taken: jumping to the 6.0.0-rc line — unnecessary risk when 5.1.1 carries the fix (upstream fixed the parser in build(deps): bump xmlutil serialization to 1.0.1 and harden data layer parsers googlemaps/android-maps-utils#1741, shipped in 5.1.0+; an earlier read that rc01 was still broken was wrong — it carries the same fix). The real upstream gap is maps-compose still pinning maps-utils-ktx 6.2.0 → utils 5.0.0; being fixed upstream separately. Also not taken: downgrading the app to xmlutil 0.91.3 — viable (fully verified, stashed on this branch as downgrade-to-0.91.3 approach for reference) but it would hold the whole app and TAKPacket-SDK back on a pre-1.0 line.
  • The direct declaration is droppable once maps-compose's own chain requires ≥ 5.1.1.

Testing Performed

  • New KmlParserLinkageTest (google unit tests): parses a minimal KML document through KmlParser on the real resolved classpath. This is a linkage canary — it failed correctly against the broken pairing during development, and will fail CI if a future Renovate bump moves either side of the maps-utils/xmlutil pairing out of step, instead of leaving the mismatch to be discovered by users opening map overlays.
  • dependencyInsight confirms android-maps-utils-data resolves to 5.1.1 on googleDebugRuntimeClasspath (no residual 5.0.0), xmlutil stays 1.0.2.
  • Full baseline green: spotlessApply spotlessCheck detekt assembleDebug test allTests.

Notes for reviewers

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Improved KML/KMZ map import reliability by upgrading the underlying maps utility dependency.
    • Prevented failures caused by incompatibility with the app’s XML processing library.
  • Tests

    • Added coverage to verify that KML documents parse successfully and detect future compatibility issues.

…lutil 1.0.x

Every KML/KMZ map overlay import has crashed with a fatal NoSuchMethodError
since 2.8.0. The transitive android-maps-utils-data 5.0.0 (via maps-compose
8.4.0 → maps-utils-ktx 6.2.0) is compiled against xmlutil 0.91.x's
XmlConfig.Builder.policyBuilder(), which xmlutil 1.0.0 removed — and the app
has shipped xmlutil 1.0.x for its CoT XML since the Renovate bump in #5998,
which wins conflict resolution over data-5.0.0's 0.91.3 request.

Upstream already fixed the parser: 5.1.1 (2026-08-11) is built against
xmlutil 1.0.x's compat builder (XmlConfig.CompatBuilder.policyBuilder(),
present in 1.0.2). Declare android-maps-utils 5.1.1 directly so it raises the
whole 5.0.0 submodule set; drop the declaration once maps-compose's own chain
requires >= 5.1.1. The 6.0.0-rc01 line is not a fix: its published bytecode
still calls the removed 0.91.x API despite declaring xmlutil 1.0.1.

KmlParserLinkageTest (google unit tests) now parses a minimal KML document
through the real resolved classpath, so a future bump on either side of the
maps-utils/xmlutil pairing fails CI instead of crashing users on map import.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 42623030-5f62-4bc1-b6b9-d64bfccc6255

📥 Commits

Reviewing files that changed from the base of the PR and between 7b50b07 and abcfb8c.

📒 Files selected for processing (3)
  • androidApp/build.gradle.kts
  • androidApp/src/testGoogle/kotlin/org/meshtastic/app/map/KmlParserLinkageTest.kt
  • gradle/libs.versions.toml

Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The Google build adds android-maps-utils 5.1.1 through the version catalog. A Google-source-set test parses minimal KML with KmlParser and checks successful linkage with the app’s xmlutil dependency.

Changes

KML parser compatibility

Layer / File(s) Summary
Configure android-maps-utils 5.1.1
gradle/libs.versions.toml, androidApp/build.gradle.kts
The version catalog defines the 5.1.1 version and library alias. The Google source set adds the dependency.
Validate KmlParser linkage
androidApp/src/testGoogle/kotlin/org/meshtastic/app/map/KmlParserLinkageTest.kt
The test parses a minimal KML document with KmlParser and asserts a non-null result.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to abcfb

This PR updates the map dependency and adds a regression test for KML imports; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: simulationstation, thebentern

🚥 Pre-merge checks | ✅ 8
✅ Passed checks (8 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Sibling Call Sites And Presence Semantics ✅ Passed The HEAD diff changes only Google dependency metadata and adds a KML parser test; it changes no field nullability, presence checks, zero-guards, or physical-value defaults.
Tests Prove The Path, Not The End State ✅ Passed The added test invokes KmlParser.parse on a real minimal KML stream and asserts a non-null result; reverting the 5.1.1 dependency restores the documented 5.0.0/xmlutil linkage failure.
Regression Coverage For Changed Behavior ✅ Passed The Google-only dependency bump is covered: KmlParserLinkageTest directly parses KML, and published bytecode changes from 5.0.0 policyBuilder to 5.1.1 CompatBuilder, so it fails without the fix.
Moved Code Diffed Against Its Original ✅ Passed The commit has no deleted or renamed declarations. It adds a dependency declaration and a new linkage test only, so the moved-code check is inapplicable.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the dependency upgrade and its purpose of preventing KML import failures with xmlutil 1.0.x.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant