Skip to content

Enable OSUI ViewRenderer by default#872

Merged
Kyle-Ye merged 9 commits into
mainfrom
codex/interpose-render-flag
May 23, 2026
Merged

Enable OSUI ViewRenderer by default#872
Kyle-Ye merged 9 commits into
mainfrom
codex/interpose-render-flag

Conversation

@Kyle-Ye
Copy link
Copy Markdown
Member

@Kyle-Ye Kyle-Ye commented May 23, 2026

Agent Summary

What Changed

  • Renamed the SwiftUI render build flag to OPENSWIFTUI_SWIFTUI_RENDER and defaulted it off for package builds.
  • Kept kdebug interposition available outside the SwiftUI renderer path.
  • Made the SwiftUI-backed renderer path explicit across OpenSwiftUI, OpenSwiftUICore, symbol dual test stubs, and UI test workflows.
  • Added ViewRendererVendor so runtime code and tests can identify whether OpenSwiftUI or SwiftUI rendering is active.
  • Replaced the compile-time SwiftUI ABI check with a runtime availability guard that only runs when the SwiftUI renderer path is used.
  • Updated integration docs to state that renderer ABI limits do not apply unless OPENSWIFTUI_SWIFTUI_RENDER=1 is enabled.

Why

The default integration path should not inherit SwiftUI renderer ABI restrictions. Those restrictions are only relevant when callers explicitly choose the SwiftUI renderer implementation.

Validation

  • OPENSWIFTUI_USE_LOCAL_DEPS=1 OPENSWIFTUI_SWIFTUI_RENDER=1 OPENATTRIBUTEGRAPH_OPENATTRIBUTESHIMS_ATTRIBUTEGRAPH=1 swift build --target OpenSwiftUICore

@Kyle-Ye Kyle-Ye changed the title [codex] Make SwiftUI renderer opt-in Enable OSUI ViewRenderer by default May 23, 2026
@Kyle-Ye Kyle-Ye linked an issue May 23, 2026 that may be closed by this pull request
@Kyle-Ye Kyle-Ye marked this pull request as ready for review May 23, 2026 16:53
@Kyle-Ye Kyle-Ye requested a review from Mx-Iris as a code owner May 23, 2026 16:53
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented May 23, 2026

🤖 Augment PR Summary

Summary: This PR makes OpenSwiftUI’s own view renderer the default, and treats the SwiftUI-backed renderer as an explicit opt-in path.

Changes:

  • Switched the SwiftUI renderer build flag to OPENSWIFTUI_SWIFTUI_RENDER and defaulted it off for SwiftPM builds.
  • Updated Swift/C/C++ conditional compilation sites to use the new flag name.
  • Made SwiftUI renderer ABI validation runtime-based (only enforced when the SwiftUI renderer path is enabled).
  • Kept kdebug_is_enabled interposition available even when not using the SwiftUI renderer.
  • Added ViewRendererVendor + viewRendererVendor so code/tests can detect which renderer is active.
  • Adjusted UI test workflows to run with OPENSWIFTUI_SWIFTUI_RENDER=1.
  • Updated integration documentation to clarify ABI restrictions are optional/opt-in.

Technical Notes: Package settings now define OPENSWIFTUI_SWIFTUI_RENDER only for Darwin platforms; build scripts default it to 0 unless explicitly overridden.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@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. 1 suggestion posted.

Fix All in Augment

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

Comment thread Sources/OpenSwiftUICore/Render/DisplayList/DisplayListViewRenderer.swift Outdated
@github-actions github-actions Bot added type: feature New API, behavior, platform support, or user-facing capability. area: rendering DisplayList, render backends, renderer hosts, drawing, and effects. labels May 23, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 23, 2026

Codecov Report

❌ Patch coverage is 78.57143% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 27.06%. Comparing base (0674dc5) to head (c79cea0).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...e/Render/DisplayList/DisplayListViewRenderer.swift 72.72% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #872      +/-   ##
==========================================
+ Coverage   25.71%   27.06%   +1.34%     
==========================================
  Files         677      678       +1     
  Lines       47008    47004       -4     
==========================================
+ Hits        12090    12721     +631     
+ Misses      34918    34283     -635     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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 codex/interpose-render-flag branch 2 times, most recently from dd9768e to f0f9959 Compare May 23, 2026 17:24
@Kyle-Ye
Copy link
Copy Markdown
Member Author

Kyle-Ye commented May 23, 2026

/uitest

@Kyle-Ye Kyle-Ye force-pushed the codex/interpose-render-flag branch from f0f9959 to c79cea0 Compare May 23, 2026 17:45
@Kyle-Ye
Copy link
Copy Markdown
Member Author

Kyle-Ye commented May 23, 2026

/uitest macos

@Kyle-Ye Kyle-Ye merged commit 899460f into main May 23, 2026
7 of 18 checks passed
@Kyle-Ye Kyle-Ye deleted the codex/interpose-render-flag branch May 23, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: rendering DisplayList, render backends, renderer hosts, drawing, and effects. type: feature New API, behavior, platform support, or user-facing capability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add OpenSwiftUI renderer

1 participant