Commit d87e494
[C#] Improve error messages for Views (#4435)
This is the implementation of a fix for #4425
# Description of Changes
* Clarified C# generator diagnostics for view return types:
1. Updated the comments around `IQuery<T>` handling to describe the
return value as `T?`, matching C# semantics.
2. Adjusted the validation comment to say views must return `List<T>` or
nullable `T` instead of “Vec/Option”.
* Synced the diagnostics fixture comments with the new terminology so
STDB0024 examples talk about `List<T>`/`T?`.
* Checked current documentation for anything C# related to “Vec/Option”
and confirmed everything now references `List<T>`/`T?`.
* Regenerated/verified tests and snapshots.
# API and ABI breaking changes
None
# Expected complexity level and risk
1 - Changes are documentation and diagnostic-comment only.
# Testing
- [X] CLI rebuilt, local `dotnet test` pass and error output tests
validated.
---------
Signed-off-by: Ryan <r.ekhoff@clockworklabs.io>
Co-authored-by: joshua-spacetime <josh@clockworklabs.io>1 parent e8a2d33 commit d87e494
4 files changed
Lines changed: 82 additions & 46 deletions
File tree
- crates/bindings-csharp
- Codegen.Tests
- fixtures/diag/snapshots
- Codegen
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
19 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
20 | 32 | | |
21 | 33 | | |
22 | 34 | | |
| |||
63 | 75 | | |
64 | 76 | | |
65 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
66 | 84 | | |
67 | 85 | | |
68 | 86 | | |
| |||
257 | 275 | | |
258 | 276 | | |
259 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
260 | 324 | | |
Lines changed: 12 additions & 40 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
334 | 333 | | |
335 | | - | |
336 | 334 | | |
337 | | - | |
| 335 | + | |
338 | 336 | | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | 337 | | |
346 | | - | |
| 338 | + | |
347 | 339 | | |
348 | 340 | | |
349 | 341 | | |
350 | | - | |
351 | | - | |
| 342 | + | |
| 343 | + | |
352 | 344 | | |
353 | 345 | | |
354 | 346 | | |
| |||
372 | 364 | | |
373 | 365 | | |
374 | 366 | | |
375 | | - | |
376 | 367 | | |
377 | | - | |
378 | 368 | | |
379 | | - | |
| 369 | + | |
380 | 370 | | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | 371 | | |
388 | | - | |
| 372 | + | |
389 | 373 | | |
390 | 374 | | |
391 | 375 | | |
392 | | - | |
393 | | - | |
| 376 | + | |
| 377 | + | |
394 | 378 | | |
395 | 379 | | |
396 | 380 | | |
| |||
414 | 398 | | |
415 | 399 | | |
416 | 400 | | |
417 | | - | |
418 | 401 | | |
419 | | - | |
420 | 402 | | |
421 | | - | |
| 403 | + | |
422 | 404 | | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | 405 | | |
434 | | - | |
| 406 | + | |
435 | 407 | | |
436 | 408 | | |
437 | 409 | | |
438 | | - | |
439 | | - | |
| 410 | + | |
| 411 | + | |
440 | 412 | | |
441 | 413 | | |
442 | 414 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
219 | | - | |
220 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1189 | 1189 | | |
1190 | 1190 | | |
1191 | 1191 | | |
1192 | | - | |
| 1192 | + | |
1193 | 1193 | | |
1194 | 1194 | | |
1195 | 1195 | | |
| |||
1210 | 1210 | | |
1211 | 1211 | | |
1212 | 1212 | | |
1213 | | - | |
| 1213 | + | |
1214 | 1214 | | |
1215 | 1215 | | |
1216 | 1216 | | |
| |||
0 commit comments