googleapis / googleapis/google-cloud-swift
sidekick: suppress swift warnings for specific functions
- Dominant language
- Swift
- Stars
- 26
- Forks
- 10
- Avg merge
- 12h 56m
- Merged PRs (30d)
- 211
Description
Starting with Swift 6.4 we should be able to suppress warnings in some specific functions:
https://github.com/swiftlang/swift-evolution/blob/main/proposals/0522-source-warning-control.md
This is desirable because:
- We should use `-warnings-as-errors` in CI and development to detect portability and future-proof problems as early as possible
- Note that we must not force `-warnings-as-errors` on customers, because they may be compiling with a different toolchain
- We should to emit deprecation attributes for deprecated elements, so customers get a warning when they use such elements
- We must use these deprecated elements in the generated code, to support them if they are still used by the application or received from the wire
If we enable `-warnings-as-errors` in our builds then any generated code using the deprecated elements fails to build. We are forced to use `-warnings-as-errors` **and** `-suppress-warnings DeprecatedDeclaration` which leaves us blind to using deprecated things in hand-crafted code.
Contributor guide
Research direction
Start by reading Swift Evolution proposal SE-0522 and inspect the current use of -warnings-as-errors and -suppress-warnings DeprecatedDeclaration in the build and generated-code paths. Done means generated code using deprecated elements still compiles while deprecation warnings remain visible for hand-written code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100