Skip to content

Support for suppressing warnings in specific packages #1839

@watt

Description

@watt

There's a strategy discussed on the bazelbuild community slack for suppressing warnings in external dependencies that works like this:

Add these lines to .bazelrc to disable warnings both remote and local

build --features=suppress_warnings
build --features=swift.suppress_warnings

then add these lines to REPO.bazel to re-enable warnings for in-repo files

repo(
    features = [
        "-suppress_warnings",
        "-swift.suppress_warnings",
    ],
)

This works, but is an all-or-nothing approach.

One can also disable warnings on a specific repo by using a patch, but this is cumbersome to create. It would be nice to be able to suppress warnings at a package level more conveniently, perhaps using configure_package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions