Skip to content

Fixed trim warnings in DDB High Level #3749

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

Merged
merged 1 commit into from
Apr 10, 2025
Merged

Conversation

normj
Copy link
Member

@normj normj commented Apr 8, 2025

Issue

#3362 (comment)

Description

Awhile back we took in PR #346 that added support for polymorphic types. This created new collections maintained by the DDB high level library for the derived types and these new collection caused trim warnings only when doing an actual aot build. The new collections of types didn't have the required annotations and the fact the fact that calling code was directly interacting with these collections made it hard to annotate.

I refactored the internals to keep access to the collections and only accessible through TryGet methods that had the required annotations. Given all types representing user data have the annotations to say keep all metadata the suppressions added in the PR should be safe. All of the derived types will be registered with the with the HLL using the AddDerivedType method which has the annotations that says don't trim anything from the type.

Testing

Dry Run: DRY_RUN-aea16048-9849-4917-81f5-d18dbb9a1e4e (Successful)
Build and ran Native AOT application exercising code paths and confirmed no trim warnings

@normj normj merged commit 26828bb into v4-development Apr 10, 2025
2 checks passed
@normj normj deleted the normj/ddb-aot-warnings branch April 10, 2025 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants