Skip to content

Add initial Compute binary support - #197

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

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

Conversation

@Kyle-Ye

@Kyle-YeKyle-Ye commented Feb 8, 2026

Copy link
Copy Markdown
Member

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

codecovBot commented Feb 8, 2026

Copy link
Copy Markdown

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 
FlagCoverage Δ
ios32.10% <ø> (ø)
macos9.95% <ø> (ø)
ubuntu0.00% <ø> (ø)

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

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

@Kyle-Ye
Kyle-Yeforce-pushed the feature/compute_dependency branch 2 times, most recently from 9526c3d to 66e2631CompareFebruary 25, 2026 11:39
@Kyle-Ye
Kyle-Yeforce-pushed the feature/compute_dependency branch from 66e2631 to 3c1bf92CompareFebruary 25, 2026 12:26
@Kyle-YeKyle-Ye changed the title Add Compute dependencyAdd initial Compute binary supportFeb 25, 2026
@Kyle-Ye
Kyle-Ye marked this pull request as ready for review February 25, 2026 12:58
@augmentcode

Copy link
Copy Markdown
🤖 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 👎

@augmentcodeaugmentcodeBot left a comment

Copy link
Copy Markdown

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.

Comment threadPackage.swift
Comment threadSources/OpenAttributeGraphShims/GraphShims.swift
@Kyle-Ye
Kyle-Ye merged commit 370c3ac into mainFeb 25, 2026
6 checks passed
@Kyle-Ye
Kyle-Ye deleted the feature/compute_dependency branch February 25, 2026 14:25
@Kyle-YeKyle-Ye linked an issue Feb 25, 2026 that may be closed by this pull request
Comment threadSources/OpenAttributeGraphShims/Graph+Debug.swift
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Compute integration in OAGShims

2 participants

@Kyle-Ye@jcmosc