Skip to content

Fix ShapeType initialization crash - #975

Merged
Kyle-Ye merged 1 commit into
mainfrom
bugfix/shape_layer_fix
Aug 2, 2026
Merged

Fix ShapeType initialization crash#975
Kyle-Ye merged 1 commit into
mainfrom
bugfix/shape_layer_fix

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented Aug 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Classify basic shape paths without trapping during layer rendering.
  • Select and configure CALayer or CAShapeLayer for supported solid-color shapes.
  • Re-enable the OpenSwiftUI clip-effect snapshot suite.

Root cause

ShapeType.init and the related shape-layer visitor helpers still called the unimplemented failure path, causing basic shape rendering and clipping to crash.

Impact

Basic rectangles, circular and rounded shapes, and supported stroked paths can now be represented by shape layers instead of terminating during rendering.

Validation

Lightweight diff validation passed. The UI test suite was not run locally.

@github-actions github-actions Bot added area: graphics Color, shape, gradient, image, symbols, and graphics primitives. area: rendering DisplayList, render backends, renderer hosts, drawing, and effects. impact: crash Crash, assertion, or fatal runtime failure. type: bug Something is not working correctly. labels Aug 2, 2026
@Kyle-Ye
Kyle-Ye marked this pull request as ready for review August 2, 2026 19:52
@Kyle-Ye
Kyle-Ye merged commit 3f240e2 into main Aug 2, 2026
2 of 8 checks passed
@Kyle-Ye
Kyle-Ye deleted the bugfix/shape_layer_fix branch August 2, 2026 19:52
@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 53 lines in your changes missing coverage. Please review.
✅ Project coverage is 14.88%. Comparing base (252f0fc) to head (06b00a8).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
Sources/OpenSwiftUICore/Shape/ShapeLayer.swift 0.00% 53 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (252f0fc) and HEAD (06b00a8). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (252f0fc) HEAD (06b00a8)
2 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #975       +/-   ##
===========================================
- Coverage   27.30%   14.88%   -12.42%     
===========================================
  Files         730      688       -42     
  Lines       53134    46885     -6249     
===========================================
- Hits        14506     6977     -7529     
- Misses      38628    39908     +1280     

☔ View full report in Codecov by Harness.
📢 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Color, shape, gradient, image, symbols, and graphics primitives. area: rendering DisplayList, render backends, renderer hosts, drawing, and effects. impact: crash Crash, assertion, or fatal runtime failure. type: bug Something is not working correctly.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant