-
Notifications
You must be signed in to change notification settings - Fork 5k
Add non aot compatible support for collection reading and writing #49755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds non-AOT compatible support for collection reading and writing while updating testing and reflection-based builder components.
- Updated test classes to indicate that reflection builder support is disabled.
- Removed obsolete tests and replaced/refactored the ReflectionContext with a new ModelReaderWriterReflectionContext and additional reflection builder implementations.
- Updated ModelReaderWriter methods and related API definitions with dynamic reflection attributes to support non-AOT scenarios.
Reviewed Changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
sdk/core/System.ClientModel/tests/ModelReaderWriterTests/Models/AvailabilitySetDatas/ImmutableDictionaryTests.cs | Added override for HasReflectionBuilderSupport set to false. |
sdk/core/System.ClientModel/tests/ModelReaderWriterTests/Models/AvailabilitySetDatas/ImmutableArrayTests.cs | Added override for HasReflectionBuilderSupport set to false. |
sdk/core/System.ClientModel/tests/ModelReaderWriterTests/Models/AvailabilitySetDatas/DictionaryIntKeyTests.cs | Added override for HasReflectionBuilderSupport set to false. |
sdk/core/System.ClientModel/tests/ModelReaderWriterTests/Models/AvailabilitySetDatas/CustomCollectionTests.cs | Added override for HasReflectionBuilderSupport set to false. |
sdk/core/System.ClientModel/tests/ModelReaderWriterTests/ModelReaderWriterGeneralTests.cs | Removed tests for non-generic list reading which are now unsupported. |
sdk/core/System.ClientModel/src/ModelReaderWriter/ReflectionModelBuilder.cs, Reflection* files | Introduced several new reflection builder classes to support non-AOT usage and removed the old ReflectionContext. |
sdk/core/System.ClientModel/src/ModelReaderWriter/ModelReaderWriter.cs | Updated Write and Read methods to use the new ModelReaderWriterReflectionContext and added reflection attributes. |
sdk/core/System.ClientModel/api/* | Updated API definitions across target frameworks removing constraints and adding dynamic code attributes. |
...re/System.ClientModel/src/ModelReaderWriter/Reflection/ModelReaderWriterReflectionContext.cs
Show resolved
Hide resolved
...re/System.ClientModel/src/ModelReaderWriter/Reflection/ModelReaderWriterReflectionContext.cs
Show resolved
Hide resolved
API change check APIView has identified API level changes in this PR and created following API reviews. |
Fixes #48294
Should not be shipped until we release new version of all sdks which opt into AOT compatibility as mentioned in this tracking issue #48292
Needs to wait for #49945 and SCM 1.4.1 to go live.