Skip to content

Fix Android build: remove the dead 1DS Java HTTP bridge - #964

Merged
sheetalarkadam merged 1 commit into
mainfrom
fix/android-telemetry-build
Aug 10, 2026
Merged

Fix Android build: remove the dead 1DS Java HTTP bridge#964
sheetalarkadam merged 1 commit into
mainfrom
fix/android-telemetry-build

Conversation

@sheetalarkadam

@sheetalarkadam sheetalarkadam commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Problem

main does not compile for Android:

sdk_v2/cpp/src/telemetry/android_telemetry_bridge.cc:4:10: fatal error:
'http/HttpClient_Android.hpp' file not found

Introduced by #953, which made telemetry mandatory
(find_package(MSTelemetry CONFIG REQUIRED)) and added
android_telemetry_bridge.cc under if(ANDROID).

Fix

The Java/JNI transport does not exist in this configuration: Android uploads
over curl exactly like Linux. T
Removed, subtractively:

  • src/telemetry/android_telemetry_bridge.cc (whole file)
  • the if(ANDROID) source-list entry that pulled it in
  • the #if defined(__ANDROID__) declaration and upload gate in
    one_ds_telemetry.cc

Risk

  • Android: none. Telemetry has never compiled there, so there is no
    behaviour to regress.

If the Java bridge is wanted on Android for policy or proxy reasons, that is a
separate change: the port would need MATSDK_USE_VCPKG_DEPS=OFF for Android
and to install the header. This PR restores the build; it does not close off
that option.

Verification

  • Clean Android arm64-v8a Release build — 166/166 targets, links
  • Windows RelWithDebInfo build succeeds; all 20 telemetry unit tests pass

The C++ core does not compile for Android:

  android_telemetry_bridge.cc:4:10: fatal error:
  'http/HttpClient_Android.hpp' file not found

HttpClient_Android.hpp is an internal header of cpp_client_telemetry
(upstream lib/http/), and ports/cpp-client-telemetry/portfile.cmake installs
only the public mat/ surface, so the include cannot resolve.

Installing that header would not have been the fix. The port configures
upstream with -DMATSDK_USE_VCPKG_DEPS=ON, and upstream's lib/CMakeLists.txt
compiles http/HttpClient_Android.cpp only in the *else* branch of that option;
with vcpkg deps, Android builds HttpClient_Curl.cpp instead. Confirmed against
the built library: libmat.a for arm64-android defines 0 HttpClient_Android
symbols and 37 HttpClient_Curl symbols. Adding the header would have traded a
compile error for a link error.

So the Java/JNI transport does not exist in this configuration. Android
uploads over curl exactly like Linux, and the readiness gate it guarded was
asking a question with no meaning here -- it could only ever have suppressed
uploads that in fact work. Remove the bridge, the gate, and the source-list
entry that pulled it in.

No behavioural risk on desktop: the removed code was all inside ANDROID /
__ANDROID__ guards. No regression risk on Android either, since telemetry has
never compiled there.

Verified: clean Android arm64-v8a build (166/166, links) and a Windows
RelWithDebInfo build.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 24ef037b-246f-4fea-a1a3-4fae5223cb0c
@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
foundry-local Ready Ready Preview Aug 7, 2026 9:22pm

Request Review

@sheetalarkadam
sheetalarkadam marked this pull request as ready for review August 7, 2026 21:37
@sheetalarkadam
sheetalarkadam requested review from bmehta001 and a balanced review from Copilot August 7, 2026 21:37

Copilot AI left a comment

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@sheetalarkadam
sheetalarkadam merged commit c52b645 into main Aug 10, 2026
51 of 52 checks passed
@sheetalarkadam
sheetalarkadam deleted the fix/android-telemetry-build branch August 10, 2026 17:54
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.

3 participants