Skip to content

add swift.suppress_warnings feature#1489

Merged
aaronsky merged 2 commits intobazelbuild:masterfrom
aaronsky:aaronsky/feat-suppress-warnings
Feb 10, 2025
Merged

add swift.suppress_warnings feature#1489
aaronsky merged 2 commits intobazelbuild:masterfrom
aaronsky:aaronsky/feat-suppress-warnings

Conversation

@aaronsky
Copy link
Copy Markdown
Contributor

@aaronsky aaronsky commented Feb 9, 2025

This is something I could use in my codebase. I would like have a way to propagate the -suppress-warnings flag to all swift libraries, and specifically, selectively disable it in my REPO.bazel and individual targets. This would allow me to globally suppress warnings for external repositories, without enabling it in my own code, and without needing to juggle the state of the flag setting (-suppress-warnings and other diagnostic flags are mutually exclusive afaik). This is the same as how we organize the swift.warnings_as_errors feature today.

Companion change in apple_support is bazelbuild/apple_support#367

@aaronsky aaronsky marked this pull request as ready for review February 9, 2025 20:13
aaronsky added a commit to bazelbuild/apple_support that referenced this pull request Feb 10, 2025
This is something I could use in my codebase. I would like have a way to
propagate the `-w` flag to all clang-using targets, and specifically,
selectively disable it in my REPO.bazel and individual targets. This
would allow me to globally suppress warnings for external repositories,
without enabling it in my own code, and without needing to juggle the
state of the flag setting (`-w` and other diagnostic flags are mutually
exclusive afaik). This is the same as how we organize the
`treat_warnings_as_errors` feature today.

Companion change in rules_swift is bazelbuild/rules_swift#1489
@aaronsky aaronsky merged commit 4980ef1 into bazelbuild:master Feb 10, 2025
1 check passed
@aaronsky aaronsky deleted the aaronsky/feat-suppress-warnings branch February 10, 2025 18:35
aaronsky added a commit to aaronsky/rules_swift that referenced this pull request Feb 11, 2025
This is something I could use in my codebase. I would like have a way to
propagate the `-suppress-warnings` flag to all swift libraries, and
specifically, selectively disable it in my REPO.bazel and individual
targets. This would allow me to globally suppress warnings for external
repositories, without enabling it in my own code, and without needing to
juggle the state of the flag setting (`-suppress-warnings` and other
diagnostic flags are mutually exclusive afaik). This is the same as how
we organize the `swift.warnings_as_errors` feature today.

Companion change in apple_support is bazelbuild/apple_support#367
aaronsky added a commit that referenced this pull request Feb 11, 2025
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.

3 participants