Commit 959c429
authored
Fix winget-completions breaking winget show (#1090)
by dropping output parsing of non-stable unstructured output into
structured output.
---
winget-completions.nu defines more than custom completions: it defines
parsing for `winget show`, `winget source list`, `winget search`,
`winget list`.
`winget show` shows different user messages and rendered manifest
information.
#825 reports winget show breakage for `winget show` for packages
`carapace`, `Peppy.Osu!`, `flux.flux`.
The source yaml (for example
[rsteube.Carapace.locale.en-US.yaml][sourceyaml]) is in YAML format. The
command implementation tries to parse the rendered output and transform
it into yaml, but fails to do so. The logic is quite complicated and
error prone, with no guarantees on `winget show` output stability in
text or format.
Rather than trying to this the script, it seems safer to drop parsing
the output into a structure format. #825 indicates winget show has been
broken for a year.
If we want to support structured output from `winget show`, it would be
preferable to depend on `winget show` offering a structured output
option (which it currently does not offer), or at least not offer
error-prone parsing as a default part of *custom completions*. Users can
still parse the output themselves. Independent of this removal, users
may suggest alternative less error-prone or custom-completion-breaking
approaches.
[sourceyaml]:
https://github.com/microsoft/winget-pkgs/blob/2ec31577c47a3c9fb141a2b6ef3113333ccef00f/manifests/r/rsteube/Carapace/1.3.0/rsteube.Carapace.locale.en-US.yaml
Resolves #825
BREAKING: Drops structured output from `winget show`1 parent bb19fdd commit 959c429
1 file changed
+2
-60
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | 192 | | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
| 193 | + | |
252 | 194 | | |
253 | 195 | | |
254 | 196 | | |
| |||
0 commit comments