Rearchitect vcpkg port for official submission#1414
Conversation
8c1d2b5 to
0999317
Compare
lalitb
left a comment
There was a problem hiding this comment.
This PR bundles the vcpkg port rewrite with changes that are already under review in #1415 and partially in #1416. That makes this very hard to review.
Please keep these separate. The recommended path:
- Let #1415 land first (after addressing its open feedback)
- Either close this PR and open a new one rebased on top of #1415 containing only the vcpkg-unique changes or scope this PR down to just those changes and let the CI fail for now until #1415 merges. Either way, the vcpkg work should not carry duplicate bug fixes that are being reviewed and corrected elsewhere.
3c281e7 to
549645f
Compare
|
@lalitb Thanks for the reviews so far. I am not sure if you were on the email thread where I described how I split up the vcpkg PR into 3 to make it easier to review and merge. Unfortunately, I cannot make the branches completely separate, if I want to be able to ensure that the cumulative changes still pass all tests. So, I separated the pipeline + test fixes into #1415, then created a new branch from that PR with additional CMake changes + cleanup in #1416 (fixed some syntax issues, removed outdated files, used standard CMake style that the vcpkg PR then follows, and necessary compilation fixes). The original vcpkg PR (#1414) contains all these changes plus the changes for a vcpkg port. Thus, the order that they should be reviewed and merged in are #1415 -> #1416 -> #1414. I will cherry-pick/rebase/merge from main for the later PRs as needed as we go through PR revisions and each previous PR is merged in. It would be great if we can focus on just #1415 for now. If this is too confusing, I can close the #1416 / #1414 PRs for now and re-open them once #1415 is merged. Happy to discuss more over email/Teams/a call, if that is easier |
7a5f685 to
0d9bb76
Compare
6d9b5c4 to
c857e4b
Compare
e6fd7e3 to
9e2b8fe
Compare
Local review found the overlay port was still downloading an older source snapshot, so vcpkg validation could pass without exercising the current PR code. Update the REF/SHA512 to the current PR source archive and validate the Windows overlay-port consumer against that archive. Validation: - tests/vcpkg/test-vcpkg-windows.ps1 -VcpkgRoot tools/vcpkg - Material self-review found no issues Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment 3339226785: --simulator always builds arm64-ios-simulator, which cannot run on Intel macOS. Add an early Apple Silicon capability check that also allows Rosetta shells on Apple Silicon via hw.optional.arm64. Verified at tests/vcpkg/test-vcpkg-ios.sh. Validation: - bash -n tests/vcpkg/test-vcpkg-ios.sh - Material self-review found no issues Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment 3339346904: APPLE_HTTP was defined in two locations. Remove the duplicate later block and keep the definition near the BUILD_APPLE_HTTP option. Verified at CMakeLists.txt. Comment 3339346945: ODWLogger.h exposes PrivacyGuard/Sanitizer init-config types even when module-backed wrappers are disabled. Always compile the init-config/support classes with BUILD_OBJC_WRAPPER, and keep only the module-backed wrapper implementations conditional. Verified at lib/CMakeLists.txt. Validation: - CMake configure on Windows legacy path - Material self-review found no issues Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the overlay port REF/SHA512 so vcpkg validation downloads the current PR source snapshot that includes the latest review fixes. Validation: - tests/vcpkg/test-vcpkg-windows.ps1 -VcpkgRoot tools/vcpkg Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment 3339435283: the simctl create hint omitted the required runtime identifier. Replace the invalid one-liner with guidance to use Xcode Devices and Simulators or list device/runtime identifiers before creating a simulator. Verified at tests/vcpkg/test-vcpkg-ios.sh. Validation: - bash -n tests/vcpkg/test-vcpkg-ios.sh - Material self-review found no issues Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comments 3339555065/3339555113: Package.swift defined MATSDK_DATAVIEWER_AVAILABLE and MATSDK_SANITIZER_AVAILABLE, but no Swift sources read those compilation conditions. Remove the unused defines and keep source exclusion as the availability mechanism. Keep MATSDK_PRIVACYGUARD_AVAILABLE because Logger.swift uses it. Verified at wrappers/swift/Package.swift and wrappers/swift/Sources/OneDSSwift/Logger.swift. Comment 3339555134: no code change. add_compile_definitions requires newer CMake than the 3.5 compatibility target, so zlib must keep add_definitions here. Verified against CMake compatibility requirements. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the overlay port REF/SHA512 so the downloaded source snapshot includes the latest Swift package cleanup. This keeps overlay-port validation aligned with the source-bearing PR commits. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment 3344040029: the vcpkg port supported any non-UWP target even though the repo only supports Windows, Linux, macOS, iOS, and Android. Restrict the supports expression to those platforms and still exclude UWP. Verified at tools/ports/mstelemetry/vcpkg.json. Comment 3344040085: sqlite3_bundled comment implied this SDK enables -ffast-math. Reword it to describe guarding against toolchain/environment finite-math-only flags. Verified at lib/CMakeLists.txt. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the overlay port REF/SHA512 so vcpkg validation downloads the source snapshot that includes the latest supports-expression and comment fixes. Validation: - tests/vcpkg/test-vcpkg-windows.ps1 -VcpkgRoot tools/vcpkg Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Addresses #1412, #1390, and #781.
Summary
mstelemetryvcpkg port from a shell-script/MSBuild hybrid into a CMake-based port shape suitable for official vcpkg submission.find_package(MSTelemetry CONFIG REQUIRED)and linkMSTelemetry::mat.Stacking note
This branch is rebased on #1416 (
bhamehta/code-cleanup). Review #1414 as the vcpkg port layer on top of the CMake cleanup branch.vcpkg port changes
CONTROL-based port withvcpkg.jsonand aportfile.cmakeusingvcpkg_from_github,vcpkg_cmake_configure,vcpkg_cmake_install, andvcpkg_cmake_config_fixup.sqlite3,zlib,nlohmann-json, andcurl[ssl]only where curl is used.usageoutput for CMake consumers.CONTROL,TODO.md,get_repo_name.sh, response files, and the old MSBuild patch.CMake changes
MATSDK_USE_VCPKG_DEPSto switch dependency resolution tofind_packagetargets under vcpkg.cmake/MSTelemetryConfig.cmake.inandlib/CMakeLists.txt.Validation
git diff --checkfor the rebased branch, excluding the generated Xcode project file that uses CRLF and is already noisy underdiff --check.tests/vcpkg/test-vcpkg-windows.ps1 -VcpkgRoot <repo>\tools\vcpkgpassed locally on Windows with VS 2026 tooling.