Skip to content

Narrow Linux CVarArg compatibility#890

Closed
Kyle-Ye wants to merge 1 commit into
mainfrom
optimize/nsobject_linux
Closed

Narrow Linux CVarArg compatibility#890
Kyle-Ye wants to merge 1 commit into
mainfrom
optimize/nsobject_linux

Conversation

@Kyle-Ye
Copy link
Copy Markdown
Member

@Kyle-Ye Kyle-Ye commented Jun 1, 2026

Summary

  • Narrow the non-Darwin CVarArg compatibility conformance to NSAttributedString.
  • Refresh the nearby compatibility comment to match the narrower scope.

Validation

  • git diff --check

@github-actions github-actions Bot added area: compatibility Compatibility, availability, legacy support, and cross-version behavior. area: text Text, labels, line style, and text rendering APIs. platform: Linux Linux-specific behavior or support. type: maintenance Refactor, cleanup, dependency bump, NFC, or internal maintenance. labels Jun 1, 2026
@Kyle-Ye Kyle-Ye changed the title [codex] Narrow Linux CVarArg compatibility Narrow Linux CVarArg compatibility Jun 1, 2026
@Kyle-Ye Kyle-Ye force-pushed the optimize/nsobject_linux branch from 3cdfd60 to d1eacfc Compare June 1, 2026 17:17
@Kyle-Ye Kyle-Ye marked this pull request as ready for review June 1, 2026 17:17
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Jun 1, 2026

🤖 Augment PR Summary

Summary: Restricts the non-Darwin CVarArg compatibility shim from a broad NSObject conformance to only NSAttributedString.

Changes:

  • Updates the non-Darwin retroactive `CVarArg` conformance to target `NSAttributedString` instead of `NSObject`
  • Refreshes the nearby comment to reflect the narrower scope

🤖 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.

// Linux Foundation does not provide NSAttributedString's CVarArg conformance yet.
// Traced on swift-corelibs-foundation#5487
extension NSObject: @retroactive CVarArg {
extension NSAttributedString: @retroactive CVarArg {
Copy link
Copy Markdown

@augmentcode augmentcode Bot Jun 1, 2026

Choose a reason for hiding this comment

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

Sources/OpenSwiftUICore/View/Text/Text/Text+Localized.swift:741-745 has appendInterpolation<Subject>(_:formatter:) where Subject: NSObject storing subject as a CVarArg via FormatArgument(value:). With the NSObject: CVarArg shim removed here, this likely won’t type-check (or will regress %@ interpolation) on non-Darwin.

Severity: high

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@Kyle-Ye Kyle-Ye closed this Jun 1, 2026
@Kyle-Ye Kyle-Ye deleted the optimize/nsobject_linux branch June 1, 2026 17:29
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 26.61%. Comparing base (7f79072) to head (d1eacfc).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #890      +/-   ##
==========================================
+ Coverage   26.50%   26.61%   +0.10%     
==========================================
  Files         689      684       -5     
  Lines       48193    47618     -575     
==========================================
- Hits        12774    12673     -101     
+ Misses      35419    34945     -474     

☔ 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.

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

Labels

area: compatibility Compatibility, availability, legacy support, and cross-version behavior. area: text Text, labels, line style, and text rendering APIs. platform: Linux Linux-specific behavior or support. type: maintenance Refactor, cleanup, dependency bump, NFC, or internal maintenance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant