Commit 22162aa
Merge #10093
10093: fix: Remove incorrectly filtering VS Code cargo task execution resolution by scope r=oeed a=oeed
This fixes #9093 introduced by #8995.
A filter was present on the function that adds the execution definition to Cargo tasks. This would mean Cargo tasks defined in workspaces (i.e. `.code-workspace` files) would not be given an execution, leading to a `There is no task provider registered for tasks of type "cargo".` error as descibed in #9093. I have made a minimum reproduction setup [here](https://github.com/oeed/ra-workspace).
This PR essentially removes that check. The `if (scope) { ... }` is to handle the case where `task.scope === undefined` using a deprecated constructor. I'm not sure if that is ever likely to occur and can remove if not needed.
There is some discussion about whether it's necessary to filter the tasks before building them. From my understanding, it shouldn't be needed as we should provide an execution for all `cargo` tasks; but I'm not overly familiar with VS Code internals so I could be wrong. For more info please see [the discussion](#8995 (comment)) on #8995
Co-authored-by: Oliver Cooper <[email protected]>1 file changed
+5
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
| 61 | + | |
64 | 62 | | |
65 | 63 | | |
66 | 64 | | |
67 | 65 | | |
68 | 66 | | |
69 | 67 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | 68 | | |
75 | | - | |
| 69 | + | |
76 | 70 | | |
77 | 71 | | |
78 | 72 | | |
| |||
117 | 111 | | |
118 | 112 | | |
119 | 113 | | |
120 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
121 | 117 | | |
122 | 118 | | |
123 | 119 | | |
| |||
0 commit comments