Skip to content

Disable preferSwiftStringAPI by default due to iOS 16 / macOS 13 API availability#2495

Merged
calda merged 1 commit intonicklockwood:developfrom
calda:cal--preferSwiftStringAPI-disable-by-default
Apr 11, 2026
Merged

Disable preferSwiftStringAPI by default due to iOS 16 / macOS 13 API availability#2495
calda merged 1 commit intonicklockwood:developfrom
calda:cal--preferSwiftStringAPI-disable-by-default

Conversation

@calda
Copy link
Copy Markdown
Collaborator

@calda calda commented Apr 11, 2026

replacing(_:with:) is only available on iOS 16+ / macOS 13+. For example, the SwiftFormat codebase no longer compiles when the rule is applied, since the minimum macOS version is 10.14.

Eventually we could add something like --apple-os-version 26 that would let us have these sorts of things be enabled by default, but gated behind OS version like how we gate functionality by Swift version. The unified 26.0 / 27.0 version numbers will make this easy eventually but for now it's still a bit tricky.

@calda calda force-pushed the cal--preferSwiftStringAPI-disable-by-default branch from a2549e5 to b7fd609 Compare April 11, 2026 19:12
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.30%. Comparing base (08e0f66) to head (b7fd609).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2495   +/-   ##
========================================
  Coverage    95.30%   95.30%           
========================================
  Files          168      168           
  Lines        25383    25383           
========================================
+ Hits         24191    24192    +1     
+ Misses        1192     1191    -1     

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

@calda calda merged commit 5965207 into nicklockwood:develop Apr 11, 2026
16 checks passed
calda added a commit that referenced this pull request Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant