Skip to content

Conversation

@Kyle-Ye
Copy link
Collaborator

@Kyle-Ye Kyle-Ye commented Oct 6, 2025

Summary

Moves the -Wwarning DeprecatedDeclaration compiler flag from default settings to conditional compilation (only enabled when OPENSWIFTUI_WERROR=1).

Problem

When OpenSwiftUI is used as a non-local dependency in Xcode, the -Wwarning flag conflicts with Xcode's -suppress-warnings flag, causing a build error:

Conflicting options '-Wwarning' and '-suppress-warnings'

Solution

  • Removed -Wwarning DeprecatedDeclaration from default sharedSwiftSettings
  • Added it to the warningsAsErrorsCondition block instead
  • This preserves the warning behavior in CI/strict builds while avoiding conflicts in dependent projects

References

Test Plan

  • Builds successfully when used as a local dependency
  • Builds successfully when used as a non-local dependency in Xcode
  • Deprecated API warnings still show when OPENSWIFTUI_WERROR=1 is set

Fix external xcodeproj’s Conflicting options '-Wwarning' and '-suppress-warnings' issue
@github-actions github-actions bot added bug Something isn't working build issue P1 Medium priority labels Oct 6, 2025
@Kyle-Ye Kyle-Ye merged commit 97347da into main Oct 6, 2025
7 of 8 checks passed
@Kyle-Ye Kyle-Ye deleted the test/warning-conflict branch October 6, 2025 07:57
@codecov
Copy link

codecov bot commented Oct 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 24.65%. Comparing base (39691cb) to head (a601d7d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #552      +/-   ##
==========================================
+ Coverage   16.43%   24.65%   +8.22%     
==========================================
  Files         481      505      +24     
  Lines       26838    29204    +2366     
==========================================
+ Hits         4410     7200    +2790     
+ Misses      22428    22004     -424     

☔ 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

bug Something isn't working build issue P1 Medium priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants