Commit 526b33d
Use ctx.watch properly for crate_universe (#3569)
I don't think rctx.read did what the comment was trying to do.
https://bazel.build/rules/lib/builtins/repository_ctx#read says the
watch parameter "**default is 'auto'**...Can be the string 'yes', 'no',
or 'auto'. Passing 'yes' is equivalent to immediately invoking the
[watch()](https://bazel.build/rules/lib/builtins/repository_ctx#watch)
method; passing 'no' does not attempt to watch the file; **passing
'auto' will only attempt to watch the file when it is legal to do so**
(see watch() docs for more information."
https://bazel.build/rules/lib/builtins/repository_ctx#watch says "Note
that attempting to watch paths inside the repo currently being fetched,
or inside the working directory of the current module extension, will
result in an error. **A module extension attempting to watch a path
outside the current Bazel workspace will also result in an error.** "
This means that paths outside the workspace were already not getting
watched, so we can filter them out and then use `.watch` instead of
`.read`
Co-authored-by: UebelAndre <[email protected]>1 parent 5851175 commit 526b33d
File tree
3 files changed
+7
-6
lines changed- crate_universe
- private
- src/cli
3 files changed
+7
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
684 | 684 | | |
685 | 685 | | |
686 | 686 | | |
687 | | - | |
688 | | - | |
689 | | - | |
| 687 | + | |
690 | 688 | | |
691 | 689 | | |
692 | 690 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
124 | | - | |
| 122 | + | |
125 | 123 | | |
126 | 124 | | |
127 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| |||
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
| 197 | + | |
196 | 198 | | |
197 | 199 | | |
198 | 200 | | |
| |||
252 | 254 | | |
253 | 255 | | |
254 | 256 | | |
| 257 | + | |
255 | 258 | | |
256 | 259 | | |
257 | 260 | | |
| |||
266 | 269 | | |
267 | 270 | | |
268 | 271 | | |
| 272 | + | |
| 273 | + | |
269 | 274 | | |
270 | 275 | | |
271 | 276 | | |
| |||
0 commit comments