From 39582fb1355c08c1e20580cb4b436ec7b6bb0ddb Mon Sep 17 00:00:00 2001 From: David Souther Date: Fri, 20 Aug 2021 15:25:11 -0700 Subject: [PATCH 1/3] Document visibility requirements The targets to rust_analyzer need to be visible to the root rust_analyzer. Unfortunately, because rust_analyzer is a singular rule at the source of the repo, any package_gorup based visibility will lead to cycles in the build graph. Thus, the rules must have //visibility:public. --- docs/rust_analyzer.vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/rust_analyzer.vm b/docs/rust_analyzer.vm index a3cf522555..410fa57b83 100644 --- a/docs/rust_analyzer.vm +++ b/docs/rust_analyzer.vm @@ -45,7 +45,7 @@ A list of `rust_analyzer` compatible targets can be found by usign the following bazel query 'kind("rust_*library|rust_binary", //...:all)' ``` -Note that visibility rules apply. +WARNING: All rust_* targets provided to the root rust_analyzer must have `//visibility:public`. Run `bazel run @rules_rust//tools/rust_analyzer:gen_rust_project` whenever dependencies change to regenerate the `rust-project.json` file. It should be From b8884e36c353f8c67850e15f0b4956d33cf0ae83 Mon Sep 17 00:00:00 2001 From: David Souther Date: Mon, 23 Aug 2021 10:03:40 -0700 Subject: [PATCH 2/3] Update docs/rust_analyzer.vm Co-authored-by: UebelAndre --- docs/rust_analyzer.vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/rust_analyzer.vm b/docs/rust_analyzer.vm index 410fa57b83..d96b4f41a7 100644 --- a/docs/rust_analyzer.vm +++ b/docs/rust_analyzer.vm @@ -45,7 +45,7 @@ A list of `rust_analyzer` compatible targets can be found by usign the following bazel query 'kind("rust_*library|rust_binary", //...:all)' ``` -WARNING: All rust_* targets provided to the root rust_analyzer must have `//visibility:public`. +Note: __All `rust_*` targets provided to the root rust_analyzer must have `//visibility:public`.__ Run `bazel run @rules_rust//tools/rust_analyzer:gen_rust_project` whenever dependencies change to regenerate the `rust-project.json` file. It should be From 64b6a3cb300fe098569065e40faeae3b687ae684 Mon Sep 17 00:00:00 2001 From: UebelAndre Date: Mon, 23 Aug 2021 10:35:46 -0700 Subject: [PATCH 3/3] Regenerate documentation --- docs/rust_analyzer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/rust_analyzer.md b/docs/rust_analyzer.md index 8678da8629..e2429ac647 100644 --- a/docs/rust_analyzer.md +++ b/docs/rust_analyzer.md @@ -51,7 +51,7 @@ A list of `rust_analyzer` compatible targets can be found by usign the following bazel query 'kind("rust_*library|rust_binary", //...:all)' ``` -Note that visibility rules apply. +Note: __All `rust_*` targets provided to the root rust_analyzer must have `//visibility:public`.__ Run `bazel run @rules_rust//tools/rust_analyzer:gen_rust_project` whenever dependencies change to regenerate the `rust-project.json` file. It should be