Skip to content

Commit

Permalink
Remove explorer's proto fuzzer and proto dependencies (#4731)
Browse files Browse the repository at this point in the history
As part of migrating to the latest bazel configurations in #4729, I'm
running into proto toolchain issues. For example:
"Error: <target @@protobuf+//:cc_toolchain> (rule
'proto_lang_toolchain') doesn't contain declared provider
'ProtoLangToolchainInfo'"

Although we may eventually want more use of proto, right now the only
use is for the explorer fuzzer. The explorer codebase is essentially
frozen, so continuing to run it isn't gaining us much (in fact, we've
already disabled autofuzzing for it).

So, rather than trying to fix the proto setup, this change:

1. Deletes `explorer/fuzzing`
2. Removes proto portions of `testing/fuzzing`, which were only in-use
by the explorer
3. Removes some ancillary proto support, which would otherwise break
from the bazel changes and would be difficult to validate as "still
working"

This change is partly isolated in order to make it easier to revive bits
of (3).
  • Loading branch information
jonmeow authored Dec 20, 2024
1 parent 01ca9f0 commit 266fd6a
Show file tree
Hide file tree
Showing 594 changed files with 5 additions and 143,320 deletions.
10 changes: 0 additions & 10 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ build --host_per_file_copt=external/.*\.(c|cc|cpp|cxx)$@-w
build --per_file_copt=utils/treesitter/_treesitter.tree_sitter/.*\.c$@-w
build --host_per_file_copt=utils/treesitter/_treesitter.tree_sitter/.*\.c$@-w

# The `cc_proto_library` rule doesn't allow providing `copts`:
# https://github.com/bazelbuild/bazel/issues/22610
#
# We unfortunately need to work around issues with `-Wmissing-prototypes` in
# generated protobuf code, so pass the `copt` manually here. The warning issue
# is likely part of:
# https://github.com/llvm/llvm-project/issues/94138
build --per_file_copt=.*\.pb\.cc$@-Wno-missing-prototypes
build --host_per_file_copt=.*\.pb\.cc$@-Wno-missing-prototypes

# Default dynamic linking to off. While this can help build performance in some
# edge cases with very large linked executables and a slow linker, between using
# fast linkers on all platforms (LLD and the Apple linker), as well as having
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ repos:
- id: clang-format
name: clang-format
entry: clang-format
types_or: [c++, proto, def]
types_or: [c++, def]
language: python
args: ['-i']
additional_dependencies: ['clang-format==17.0.1']
Expand Down Expand Up @@ -184,7 +184,7 @@ repos:
Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- --custom_format
- '\.(carbon|c|json|proto|scss|ypp)(\.tmpl)?$'
- '\.(carbon|c|json|scss|ypp)(\.tmpl)?$'
- ''
- '// '
- ''
Expand Down
12 changes: 0 additions & 12 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,6 @@ bazel_dep(name = "rules_bison", version = "0.2.2")
bazel_dep(name = "rules_flex", version = "0.2.1")
bazel_dep(name = "rules_m4", version = "0.2.3")
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "rules_proto", version = "6.0.2")
bazel_dep(name = "protobuf", version = "27.1")

libprotobuf_mutator_version = "1.3"

http_archive(
name = "com_google_libprotobuf_mutator",
build_file = "@//:third_party/libprotobuf_mutator/BUILD.txt",
sha256 = "1ee3473a6b0274494fce599539605bb19305c0efadc62b58d645812132c31baa",
strip_prefix = "libprotobuf-mutator-{0}".format(libprotobuf_mutator_version),
urls = ["https://github.com/google/libprotobuf-mutator/archive/v{0}.tar.gz".format(libprotobuf_mutator_version)],
)

bazel_dep(name = "bazel_clang_tidy", dev_dependency = True)
git_override(
Expand Down
8 changes: 2 additions & 6 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion bazel/cc_toolchains/clang_cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ def _impl(ctx):
"--system-header-prefix=clang-tools-extra/",
"--system-header-prefix=clang/",
"--system-header-prefix=gmock/",
"--system-header-prefix=google/protobuf/",
"--system-header-prefix=gtest/",
"--system-header-prefix=libfuzzer/",
"--system-header-prefix=llvm/",
Expand Down
1 change: 0 additions & 1 deletion bazel/check_deps/check_non_test_cc_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@
# message.
if repo_base in (
"@google_benchmark",
"@protobuf",
"@abseil-cpp",
"@googletest",
):
Expand Down
129 changes: 0 additions & 129 deletions explorer/fuzzing/BUILD

This file was deleted.

115 changes: 0 additions & 115 deletions explorer/fuzzing/README.md

This file was deleted.

Loading

0 comments on commit 266fd6a

Please sign in to comment.