Commit 455f540
[STJ] Add support for nullable reference annotations on properties (#102499)
* Progress so far on nullability annotations
* Complete implementation and make all NullableAnnotations tests pass.
* Update annotations for all failing unit tests.
* Update src/libraries/System.Text.Json/gen/Helpers/RoslynExtensions.cs
* Update src/libraries/System.Text.Json/gen/Helpers/RoslynExtensions.cs
* Address feedback
* Update to latest approved API and semantics.
* Update src/libraries/System.Private.CoreLib/src/System/Reflection/NullabilityInfoContext.cs
Co-authored-by: David Cantú <[email protected]>
* Update src/libraries/System.Private.CoreLib/src/System/Reflection/NullabilityInfoContext.cs
Co-authored-by: David Cantú <[email protected]>
* Update src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs
Co-authored-by: David Cantú <[email protected]>
* Rename more ignoreNullableAnnotations stragglers.
* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs
Co-authored-by: David Cantú <[email protected]>
* Remove commented out code and address feedback.
* Update src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/System.Text.Json.SourceGeneration.Tests.targets
Co-authored-by: David Cantú <[email protected]>
* Ensure the original parameter name flows exception messages.
* Extract exceptions to a throw helper in the new properties.
* Extend test coverage to Nullable<T> properties.
* Revert sln changes
* Add second-pass review improvements.
---------
Co-authored-by: David Cantú <[email protected]>1 parent 5dc8a1a commit 455f540
File tree
88 files changed
+2374
-889
lines changed- src/libraries
- System.Private.CoreLib/src/System/Reflection
- System.Text.Json
- Common
- gen
- Helpers
- Model
- ref
- src
- Resources
- System
- Text/Json
- Serialization
- Converters/Object
- Metadata
- tests
- Common
- CollectionTests
- ConstructorTests
- ReferenceHandlerTests
- TestClasses
- System.Text.Json.SourceGeneration.Tests
- Serialization
- System.Text.Json.Tests
- JsonNode
- NewtonsoftTests
- Serialization
- CustomConverterTests
- MetadataTests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
88 files changed
+2374
-889
lines changedLines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
12 | 17 | | |
13 | 18 | | |
14 | 19 | | |
| |||
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
49 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
50 | 60 | | |
51 | 61 | | |
52 | 62 | | |
| |||
Lines changed: 85 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
| |||
65 | 70 | | |
66 | 71 | | |
67 | 72 | | |
| 73 | + | |
68 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
69 | 78 | | |
70 | 79 | | |
71 | 80 | | |
| |||
190 | 199 | | |
191 | 200 | | |
192 | 201 | | |
| 202 | + | |
193 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
194 | 207 | | |
195 | 208 | | |
196 | 209 | | |
| |||
212 | 225 | | |
213 | 226 | | |
214 | 227 | | |
215 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
216 | 231 | | |
217 | 232 | | |
218 | 233 | | |
| |||
243 | 258 | | |
244 | 259 | | |
245 | 260 | | |
| 261 | + | |
246 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
247 | 266 | | |
248 | 267 | | |
249 | 268 | | |
| |||
260 | 279 | | |
261 | 280 | | |
262 | 281 | | |
| 282 | + | |
263 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
264 | 287 | | |
265 | 288 | | |
266 | 289 | | |
| |||
497 | 520 | | |
498 | 521 | | |
499 | 522 | | |
| 523 | + | |
500 | 524 | | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
501 | 528 | | |
502 | 529 | | |
503 | 530 | | |
| |||
528 | 555 | | |
529 | 556 | | |
530 | 557 | | |
531 | | - | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
532 | 564 | | |
533 | 565 | | |
534 | 566 | | |
| |||
666 | 698 | | |
667 | 699 | | |
668 | 700 | | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
669 | 751 | | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
118 | 123 | | |
119 | 124 | | |
120 | 125 | | |
| |||
Lines changed: 111 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
| |||
189 | 195 | | |
190 | 196 | | |
191 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
192 | 201 | | |
193 | 202 | | |
194 | 203 | | |
| |||
269 | 278 | | |
270 | 279 | | |
271 | 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 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
272 | 383 | | |
273 | 384 | | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| |||
0 commit comments