fix: add missing AOT trimming suppressions and null safety for type names#4919
fix: add missing AOT trimming suppressions and null safety for type names#4919
Conversation
063f379 to
1cc352f
Compare
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. The PR makes two well-targeted fixes:
Both changes are consistent with the AOT compatibility requirements in CLAUDE.md. |
1cc352f to
1539f83
Compare
…ames Add [UnconditionalSuppressMessage] for IL2075 on PropertyInjector methods that call GetProperty() on ContainingType, which is already annotated with [DynamicallyAccessedMembers] in PropertyInjectionMetadata. Fix null safety in JsonExtensions where FullName can be null for generic type parameters by falling back to Name before "Unknown". Closes #4856
1539f83 to
6b5f99e
Compare
Summary
[UnconditionalSuppressMessage("Trimming", "IL2075")]toInjectSourceGeneratedPropertyAsyncandRecurseIntoNestedPropertiesCoreAsyncinPropertyInjector.cs, whereGetProperty()is called onContainingType(already annotated with[DynamicallyAccessedMembers]inPropertyInjectionMetadata)JsonExtensions.cslines 68 and 80 whereType.FullNamecan return null for generic type parameters, by adding null-conditional access and falling back toType.Namebefore the"Unknown"defaultTest plan
dotnet build TUnit.Engine/TUnit.Engine.csprojsucceeds with 0 warnings and 0 errorsCloses #4856