Skip to content

Standardize packaged telemetry dependencies - #1537

Open
bmehta001 wants to merge 4 commits into
microsoft:mainfrom
bmehta001:bhamehta/standardize-telemetry-dependencies
Open

bmehta001 wants to merge 4 commits into
microsoft:mainfrom
bmehta001:bhamehta/standardize-telemetry-dependencies

Conversation

@bmehta001

Copy link
Copy Markdown
Contributor

Summary

  • centralize pthread-safe mbedTLS configuration in the SDK-owned fetched curl path
  • document one dependency policy for Apple, Linux, Windows, and Android consumers
  • document host-owned SQLite lifecycle requirements when multiple embedded SDK copies share system SQLite

Validation

  • VS 2026 Release build with minimal SQLite and vendored zlib
  • WSL Release build with minimal SQLite, vendored zlib, and SDK-fetched curl/mbedTLS
  • downstream compatibility patches applied successfully against v3.10.240.1
  • git diff --check

Centralize the self-contained Linux curl/mbedTLS threading setup so consumers no longer carry private build scripts. Document the shared platform policy and system-SQLite lifecycle required when multiple embedded SDK copies coexist.

Files changed:
- cmake/MatsdkFetchCurl.cmake
- docs/embedding-with-cmake.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bmehta001 and others added 2 commits September 20, 2026 11:30
Installed system-provider packages must support CMake versions whose FindSQLite3 module exposes SQLite::SQLite3 instead of SQLite3::SQLite3. Normalize the legacy target to the SDK's canonical target so Linux system mode remains optional and portable.

Files changed:
- cmake/MatsdkDependencyTargets.cmake
- cmake/MSTelemetryConfig.cmake.in

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Require CMake 4.3 for builds and installed-package consumers so FindSQLite3 provides SQLite3::SQLite3 without a legacy compatibility alias. Pin CI to CMake 4.4.2 and use the newest sdkmanager release, CMake 4.1.2, for Android source builds where system SQLite discovery is not used.

Files changed: root/package dependency configuration, CI workflows and setup action, Android build entry points, standalone examples/tests/wrappers, and build documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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 review overview

🟡 Changes recommended

One or more issues must be addressed before approval.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Standardizes CMake requirements, Android tooling, dependency policies, and fetched mbedTLS threading configuration across SDK consumers and CI.

Changes:

  • Raises CMake requirements and pins CMake 4.1.2 for Android.
  • Documents packaged dependency policies and SQLite lifecycle ownership.
  • Centralizes CMake setup in CI and enables pthread-safe fetched mbedTLS.
File Description
wrappers/​swift/​CMakeLists.txt Updated as part of this pull request.
wrappers/​obj-c/​CMakeLists.txt Updated as part of this pull request.
tools/​build-android-aar.sh Updated as part of this pull request.
tests/​vcpkg/​CMakeLists.txt Updated as part of this pull request.
tests/​embedding/​CMakeLists.txt Updated as part of this pull request.
README.md Updated as part of this pull request.
lib/​android_build/​maesdk/​src/​main/​cpp/​CMakeLists.txt Updated as part of this pull request.
lib/​android_build/​maesdk/​build.gradle Updated as part of this pull request.
lib/​android_build/​app/​src/​main/​cpp/​CMakeLists.txt Updated as part of this pull request.
lib/​android_build/​app/​build.gradle Updated as part of this pull request.
examples/​objc/​cocoa-app/​CMakeLists.txt Updated as part of this pull request.
examples/​cpp/​SampleCppMini/​CMakeLists.txt Updated as part of this pull request.
examples/​cpp/​SampleCpp/​CMakeLists.txt Updated as part of this pull request.
examples/​cpp/​MacProxy/​CMakeLists.txt Updated as part of this pull request.
examples/​cpp/​EventSender/​CMakeLists.txt Updated as part of this pull request.
examples/​c/​SampleC-Guest/​CMakeLists.txt Updated as part of this pull request.
docs/​embedding-with-cmake.md Updated as part of this pull request.
docs/​cpp-start-android.md Updated as part of this pull request.
docs/​building-with-vcpkg.md Updated as part of this pull request.
CMakeLists.txt Updated as part of this pull request.
cmake/​MSTelemetryConfig.cmake.in Updated as part of this pull request.
cmake/​MatsdkRequirePresetSupport.cmake Updated as part of this pull request.
cmake/​MatsdkOptions.cmake Updated as part of this pull request.
cmake/​MatsdkFetchCurl.cmake Updated as part of this pull request.
build-android.cmd Updated as part of this pull request.
.github/​workflows/​vcpkg-release-bump.yml Updated as part of this pull request.
.github/​workflows/​test-win-latest.yml Updated as part of this pull request.
.github/​workflows/​test-vcpkg.yml Updated as part of this pull request.
.github/​workflows/​test-embedding.yml Updated as part of this pull request.
.github/​workflows/​spm-release.yml Updated as part of this pull request.
.github/​workflows/​codeql-analysis.yml Updated as part of this pull request.
.github/​workflows/​build-ubuntu-2204.yml Updated as part of this pull request.
.github/​workflows/​build-posix-latest.yml Updated as part of this pull request.
.github/​workflows/​build-ios-mac.yml Updated as part of this pull request.
.github/​workflows/​build-android.yml Updated as part of this pull request.
.github/​actions/​setup-cmake/​action.yml Updated as part of this pull request.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread CMakeLists.txt
Persist the pip-installed CMake binary directory through GITHUB_PATH so subsequent workflow steps use 4.4.2 instead of the runner default. Avoid the removed Android SDK 'tools' package while retaining platform-tools and the explicitly installed NDK and CMake packages.

Files changed: .github/actions/setup-cmake/action.yml, .github/workflows/build-android.yml, and .github/workflows/codeql-analysis.yml.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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 review overview

🟡 Changes recommended

One or more issues must be addressed before approval.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (1)

Comment thread CMakeLists.txt
Comment on lines +4 to +7
if(CMAKE_VERSION VERSION_LESS 4.3 AND NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
message(FATAL_ERROR
"MSTelemetry requires CMake 4.3 or newer. Android source builds may use "
"the Android SDK's CMake 4.1.2 package.")
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