|
|
@@ -0,0 +1,87 @@
|
|
|
+# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
|
+# Exceptions. See /LICENSE for license information.
|
|
|
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
+
|
|
|
+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:
|
|
|
+#
|
|
|
+# ```
|
|
|
+# bazelisk query 'kind("cc.* rule", attr(testonly, 0, //...))'
|
|
|
+# ```
|
|
|
+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",
|
|
|
+ ],
|
|
|
+)
|
|
|
+
|
|
|
+genquery(
|
|
|
+ name = "non_test_cc_deps.txt",
|
|
|
+ expression = "kind('cc.* rule', deps(//bazel/check_deps:non_test_cc_rules))",
|
|
|
+ opts = [
|
|
|
+ "--notool_deps",
|
|
|
+ "--noimplicit_deps",
|
|
|
+ ],
|
|
|
+ scope = [":non_test_cc_rules"],
|
|
|
+)
|
|
|
+
|
|
|
+py_test(
|
|
|
+ name = "check_non_test_cc_deps",
|
|
|
+ srcs = ["check_non_test_cc_deps.py"],
|
|
|
+ data = [":non_test_cc_deps.txt"],
|
|
|
+ main = "check_non_test_cc_deps.py",
|
|
|
+)
|
|
|
+
|
|
|
+mypy_test(
|
|
|
+ name = "check_non_test_cc_deps_mypy_test",
|
|
|
+ include_imports = True,
|
|
|
+ deps = [":check_non_test_cc_deps"],
|
|
|
+)
|