Skip to content

Conversation

@pepicrft
Copy link
Contributor

Summary

Add support for SwiftPM's disableWarning CSetting in PackageInfo. This allows packages to disable specific compiler warnings using the disableWarning(_:_:) API.

Changes

  • Add disableWarning case to SettingName enum
  • Add disableWarning(String) case to Kind enum for Xcode 14+ format
  • Add encoding/decoding support for the disableWarning setting

Example Usage

.target(
    name: "MyTarget",
    cSettings: [
        .disableWarning("unused-variable")
    ]
)

This will be mapped to the appropriate compiler flags (e.g., -Wno-unused-variable) when converted to Xcode build settings.

Related

This is part of adding full support for disableWarning in Tuist's SwiftPM integration.

🤖 Generated with Claude Code

Add support for SwiftPM's disableWarning CSetting in PackageInfo.
This allows packages to disable specific compiler warnings.

- Add disableWarning case to SettingName enum
- Add disableWarning case to Kind enum for Xcode 14+ format
- Add encoding/decoding support for disableWarning setting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Oct 30, 2025
pepicrft added a commit to tuist/tuist that referenced this pull request Oct 30, 2025
Add support for SwiftPackageManager's `disableWarning` CSetting,
allowing packages to disable specific compiler warnings.

Changes:
- Update SettingsMapper to map disableWarning to compiler flags:
  - C: Maps to OTHER_CFLAGS with -Wno-<warning>
  - C++: Maps to OTHER_CPLUSPLUSFLAGS with -Wno-<warning>
  - Swift: Maps to OTHER_SWIFT_FLAGS with -Wno-<warning>
- Update PackageInfoMapper to handle disableWarning in switch statements
- Add comprehensive tests for all three compilers
- Update Package.swift to use XcodeGraph feat/support-disable-warning branch

Related: tuist/XcodeGraph#356

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@dosubot dosubot bot added the enhancement New feature or request label Oct 30, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 30, 2025
@pepicrft pepicrft merged commit 8152f67 into main Oct 31, 2025
7 checks passed
@pepicrft pepicrft deleted the feat/support-disable-warning branch October 31, 2025 13:43
pepicrft added a commit to tuist/tuist that referenced this pull request Oct 31, 2025
Add support for SwiftPackageManager's `disableWarning` CSetting,
allowing packages to disable specific compiler warnings.

Changes:
- Update SettingsMapper to map disableWarning to compiler flags:
  - C: Maps to OTHER_CFLAGS with -Wno-<warning>
  - C++: Maps to OTHER_CPLUSPLUSFLAGS with -Wno-<warning>
  - Swift: Maps to OTHER_SWIFT_FLAGS with -Wno-<warning>
- Update PackageInfoMapper to handle disableWarning in switch statements
- Add comprehensive tests for all three compilers
- Update Package.swift to use XcodeGraph feat/support-disable-warning branch

Related: tuist/XcodeGraph#356

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants