Commit 25411ee
[prost] includes prost crate infos in rust_analyzer_aspect (#2232)
The change is fairly straightforward, but I did need to move prost
providers up to `prost/providers.bzl` and out of `private/prost.bzl` to
avoid a cyclic dependency.
What we do is:
* change `rust_prost_library` to return the `rust_proto_info` provider
* in the `rust-analyzer` aspect we iterate over transitive dep infos and
generate the appropriate `RustAnalyzerInfo`
* lastly, we use the `crate_info` from `ProstProtoInfo` if we're
processing a prost target as the "root" `crate_info`
There are a couple of things I'm not sure are correct:
1. For every prost dep I set `deps` to `[]` - I think that's correct but
I'm not sure-sure.
2. Similarly I set `proc_macro_dylib_path` to always `None` - again I
think that's correct, but not sure-sure.
Fixes #2121.
---------
Co-authored-by: UebelAndre <[email protected]>1 parent 4aafa0a commit 25411ee
File tree
5 files changed
+42
-16
lines changed- docs
- proto/prost
- private
- rust/private
5 files changed
+42
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2147 | 2147 | | |
2148 | 2148 | | |
2149 | 2149 | | |
| 2150 | + | |
2150 | 2151 | | |
2151 | 2152 | | |
2152 | 2153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | 17 | | |
27 | 18 | | |
28 | 19 | | |
| |||
328 | 319 | | |
329 | 320 | | |
330 | 321 | | |
| 322 | + | |
331 | 323 | | |
332 | 324 | | |
333 | 325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
102 | | - | |
103 | | - | |
104 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
105 | 127 | | |
106 | | - | |
107 | | - | |
| 128 | + | |
108 | 129 | | |
109 | 130 | | |
110 | 131 | | |
| |||
163 | 184 | | |
164 | 185 | | |
165 | 186 | | |
166 | | - | |
| 187 | + | |
167 | 188 | | |
168 | 189 | | |
169 | 190 | | |
| |||
0 commit comments