Skip to content

Add initial Compute binary support#197

Merged
Kyle-Ye merged 9 commits intomainfrom
feature/compute_dependency
Feb 25, 2026
Merged

Add initial Compute binary support#197
Kyle-Ye merged 9 commits intomainfrom
feature/compute_dependency

Conversation

@Kyle-Ye
Copy link
Contributor

@Kyle-Ye Kyle-Ye commented Feb 8, 2026

Summary

  • Add Compute framework as an alternative backend via binary xcframework dependency
  • Refactor Package.swift dependency resolution into three-way path: Compute / AttributeGraph / OAG
  • Add AttributeGraphVendor enum and Compute-specific API shims in GraphShims
  • Extract setupDPFDependency() to share DarwinPrivateFrameworks setup logic

Test plan

  • OPENATTRIBUTEGRAPH_OPENATTRIBUTESHIMS_COMPUTE=1 swift build resolves and builds with Compute
  • OPENATTRIBUTEGRAPH_OPENATTRIBUTESHIMS_COMPUTE=0 swift build falls back to AttributeGraph/OAG path
  • Existing CI (compatibility tests) unaffected

@codecov
Copy link

codecov bot commented Feb 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 32.08%. Comparing base (2a5d82a) to head (f190761).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #197   +/-   ##
=======================================
  Coverage   32.08%   32.08%           
=======================================
  Files          70       70           
  Lines        2596     2596           
=======================================
  Hits          833      833           
  Misses       1763     1763           
Flag Coverage Δ
ios 32.10% <ø> (ø)
macos 9.95% <ø> (ø)
ubuntu 0.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
Sources/OpenAttributeGraphShims/Graph+Debug.swift 0.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kyle-Ye Kyle-Ye force-pushed the feature/compute_dependency branch 2 times, most recently from 9526c3d to 66e2631 Compare February 25, 2026 11:39
@Kyle-Ye Kyle-Ye force-pushed the feature/compute_dependency branch from 66e2631 to 3c1bf92 Compare February 25, 2026 12:26
@Kyle-Ye Kyle-Ye changed the title Add Compute dependency Add initial Compute binary support Feb 25, 2026
@Kyle-Ye Kyle-Ye marked this pull request as ready for review February 25, 2026 12:58
@augmentcode
Copy link

augmentcode bot commented Feb 25, 2026

🤖 Augment PR Summary

Summary: This PR introduces initial support for using the Compute framework as an alternative backend for OpenAttributeGraph.

Changes:

  • Refactors Package.swift dependency selection into a 3-way choice: Compute / Apple AttributeGraph (via DarwinPrivateFrameworks) / OpenAttributeGraph (OAG) fallback.
  • Adds an optional Compute binary .xcframework dependency (URL/checksum/version controlled via environment variables).
  • Introduces AttributeGraphVendor and exports vendor-specific shims/typealiases to unify APIs across backends.
  • Extracts setupDPFDependency() to share DarwinPrivateFrameworks setup logic across compatibility tests and normal builds.
  • Disables the Darwin-only debug dictionary/dot helpers when building against Compute due to API mismatch.

Technical Notes: Backend selection is driven by OPENATTRIBUTEGRAPH_OPENATTRIBUTESHIMS_COMPUTE / OPENATTRIBUTEGRAPH_OPENATTRIBUTESHIMS_ATTRIBUTEGRAPH, and Compute builds currently pin platforms to newer OS versions.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@Kyle-Ye Kyle-Ye merged commit 370c3ac into main Feb 25, 2026
6 checks passed
@Kyle-Ye Kyle-Ye deleted the feature/compute_dependency branch February 25, 2026 14:25
@Kyle-Ye Kyle-Ye linked an issue Feb 25, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Compute integration in OAGShims

2 participants