|
|
@@ -4,62 +4,19 @@
|
|
|
|
|
|
load("@mypy_integration//:mypy.bzl", "mypy_test")
|
|
|
|
|
|
-# This filegroup should contain all the non-test C++ rules in the repository to
|
|
|
-# enable dependency checking. It can be regenerated by running the following
|
|
|
-# query command:
|
|
|
+# The filegroups establishing root rules for `genquery` invocations can be
|
|
|
+# updated by running:
|
|
|
#
|
|
|
# ```
|
|
|
-# bazelisk query 'kind("cc.* rule", attr(testonly, 0, //...))'
|
|
|
+# ./bazel/check_deps/update_roots.py
|
|
|
# ```
|
|
|
filegroup(
|
|
|
name = "non_test_cc_rules",
|
|
|
data = [
|
|
|
- "//common:check",
|
|
|
- "//common:indirect_value",
|
|
|
- "//common:ostream",
|
|
|
- "//common:string_helpers",
|
|
|
"//executable_semantics",
|
|
|
- "//executable_semantics/ast",
|
|
|
- "//executable_semantics/ast:class_definition",
|
|
|
- "//executable_semantics/ast:declaration",
|
|
|
- "//executable_semantics/ast:expression",
|
|
|
- "//executable_semantics/ast:library_name",
|
|
|
- "//executable_semantics/ast:member",
|
|
|
- "//executable_semantics/ast:paren_contents",
|
|
|
- "//executable_semantics/ast:pattern",
|
|
|
- "//executable_semantics/ast:source_location",
|
|
|
- "//executable_semantics/ast:statement",
|
|
|
- "//executable_semantics/common:arena",
|
|
|
- "//executable_semantics/common:error",
|
|
|
- "//executable_semantics/common:nonnull",
|
|
|
- "//executable_semantics/interpreter",
|
|
|
- "//executable_semantics/interpreter:address",
|
|
|
- "//executable_semantics/interpreter:dictionary",
|
|
|
- "//executable_semantics/interpreter:exec_program",
|
|
|
- "//executable_semantics/interpreter:field_path",
|
|
|
- "//executable_semantics/interpreter:heap",
|
|
|
- "//executable_semantics/interpreter:stack",
|
|
|
- "//executable_semantics/interpreter:type_checker",
|
|
|
- "//executable_semantics/syntax",
|
|
|
- "//executable_semantics/syntax:bison_wrap",
|
|
|
"//migrate_cpp/cpp_refactoring",
|
|
|
- "//migrate_cpp/cpp_refactoring:fn_inserter",
|
|
|
- "//migrate_cpp/cpp_refactoring:for_range",
|
|
|
- "//migrate_cpp/cpp_refactoring:matcher",
|
|
|
- "//migrate_cpp/cpp_refactoring:var_decl",
|
|
|
- "//toolchain/diagnostics:diagnostic_emitter",
|
|
|
"//toolchain/diagnostics:null_diagnostics",
|
|
|
- "//toolchain/driver",
|
|
|
"//toolchain/driver:carbon",
|
|
|
- "//toolchain/lexer:character_set",
|
|
|
- "//toolchain/lexer:numeric_literal",
|
|
|
- "//toolchain/lexer:string_literal",
|
|
|
- "//toolchain/lexer:token_kind",
|
|
|
- "//toolchain/lexer:tokenized_buffer",
|
|
|
- "//toolchain/parser:parse_node_kind",
|
|
|
- "//toolchain/parser:parse_tree",
|
|
|
- "//toolchain/parser:precedence",
|
|
|
- "//toolchain/source:source_buffer",
|
|
|
],
|
|
|
)
|
|
|
|
|
|
@@ -85,3 +42,16 @@ mypy_test(
|
|
|
include_imports = True,
|
|
|
deps = [":check_non_test_cc_deps"],
|
|
|
)
|
|
|
+
|
|
|
+# Note that this script expects to be run directly and not via Bazel as it in
|
|
|
+# turn invokes Bazel.
|
|
|
+py_binary(
|
|
|
+ name = "update_roots",
|
|
|
+ srcs = ["update_roots.py"],
|
|
|
+)
|
|
|
+
|
|
|
+mypy_test(
|
|
|
+ name = "update_roots_mypy_test",
|
|
|
+ include_imports = True,
|
|
|
+ deps = [":update_roots"],
|
|
|
+)
|