diff options
Diffstat (limited to 'kythe/rust/indexer/BUILD')
-rw-r--r-- | kythe/rust/indexer/BUILD | 66 |
1 files changed, 38 insertions, 28 deletions
diff --git a/kythe/rust/indexer/BUILD b/kythe/rust/indexer/BUILD index 0d3c9841f..d67f7e462 100644 --- a/kythe/rust/indexer/BUILD +++ b/kythe/rust/indexer/BUILD @@ -1,4 +1,4 @@ -load("@rules_rust//rust:rust.bzl", "rust_binary", "rust_clippy", "rust_library", "rust_test") +load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_clippy", "rust_library", "rust_test") load("//tools/build_rules/verifier_test:rust_indexer_test.bzl", "rust_indexer_test") package(default_visibility = ["//visibility:public"]) @@ -9,20 +9,21 @@ rust_library( include = ["src/**/*.rs"], exclude = ["src/bin/**"], ), - edition = "2018", + edition = "2021", deps = [ "//kythe/proto:analysis_rust_proto", "//kythe/proto:storage_rust_proto", - "//kythe/rust/cargo:base64", - "//kythe/rust/cargo:hex", - "//kythe/rust/cargo:quick_error", - "//kythe/rust/cargo:rls_analysis", - "//kythe/rust/cargo:rls_data", - "//kythe/rust/cargo:serde", - "//kythe/rust/cargo:serde_json", - "//kythe/rust/cargo:sha2", - "//kythe/rust/cargo:zip", - "@rules_rust//proto/raze:protobuf", + "@crate_index//:base64", + "@crate_index//:hex", + "@crate_index//:path-clean", + "@crate_index//:protobuf", + "@crate_index//:quick-error", + "@crate_index//:rls-analysis", + "@crate_index//:rls-data", + "@crate_index//:serde", + "@crate_index//:serde_json", + "@crate_index//:sha2", + "@crate_index//:zip", ], ) @@ -32,14 +33,12 @@ rust_binary( include = ["src/bin/bazel/*.rs"], ), crate_root = ":src/bin/bazel/main.rs", - edition = "2018", + edition = "2021", deps = [ ":kythe_rust_indexer", - "//kythe/proto:analysis_rust_proto", - "//kythe/proto:storage_rust_proto", - "//kythe/rust/cargo:anyhow", - "//kythe/rust/cargo:tempdir", - "@rules_rust//proto/raze:protobuf", + "@crate_index//:anyhow", + "@crate_index//:clap", + "@crate_index//:protobuf", ], ) @@ -49,17 +48,15 @@ rust_binary( include = ["src/bin/proxy/*.rs"], ), crate_root = ":src/bin/proxy/main.rs", - edition = "2018", + edition = "2021", deps = [ ":kythe_rust_indexer", "//kythe/proto:analysis_rust_proto", - "//kythe/proto:storage_rust_proto", - "//kythe/rust/cargo:anyhow", - "//kythe/rust/cargo:base64", - "//kythe/rust/cargo:clap", - "//kythe/rust/cargo:serde_json", - "//kythe/rust/cargo:tempdir", - "@rules_rust//proto/raze:protobuf", + "@crate_index//:anyhow", + "@crate_index//:base64", + "@crate_index//:clap", + "@crate_index//:protobuf", + "@crate_index//:serde_json", ], ) @@ -72,15 +69,17 @@ rust_test( name = "integration_tests", srcs = glob(["tests/*.rs"]), data = [ - "tests/testanalysis.json", "tests/testkzip.kzip", ], + edition = "2021", deps = [ ":inline_tests", ":kythe_rust_indexer", "//kythe/proto:analysis_rust_proto", "//kythe/proto:storage_rust_proto", - "@rules_rust//proto/raze:protobuf", + "@crate_index//:hex", + "@crate_index//:protobuf", + "@crate_index//:sha2", "@rules_rust//tools/runfiles", ], ) @@ -153,3 +152,14 @@ rust_indexer_test( name = "xrefs_test", srcs = glob(["testdata/xrefs/*.rs"]), ) + +rust_indexer_test( + name = "relative_module_test", + srcs = glob(["testdata/relative/**/*.rs"]), +) + +rust_indexer_test( + name = "out_dir_test", + srcs = ["testdata/out_dir/main.rs"], + out_dir_files = ["testdata/out_dir/generated.rs"], +) |