Skip to content
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

Support NativeAOT #397

Merged
merged 3 commits into from
Feb 5, 2024
Merged

Support NativeAOT #397

merged 3 commits into from
Feb 5, 2024

Conversation

drewnoakes
Copy link
Owner

@drewnoakes drewnoakes commented Feb 5, 2024

Fixes #394

This enables support for NativeAOT (Ahead-of-time native compilation during publish). Doing so required adding a net8.0 target, which also highlighted a few nullable annotations that needed updating.

We also add a publish step to CI, so that any future change that would break NativeAOT is caught before merge.

This enables support for NativeAOT (Ahead-of-time native compilation during publish). Doing so required adding a `net8.0` target, which also highlighted a few nullable annotations that needed updating.
@drewnoakes drewnoakes merged commit dd2c021 into main Feb 5, 2024
2 checks passed
@drewnoakes drewnoakes deleted the native-aot branch February 5, 2024 02:54
@@ -221,7 +221,11 @@ public static bool CanContainMetadata(this JpegSegmentType type)
}

/// <summary>Gets JPEG segment types that might contain metadata.</summary>
#if NET5_0_OR_GREATER
public static IReadOnlyList<JpegSegmentType> CanContainMetadataTypes { get; } = Enum.GetValues<JpegSegmentType>().Cast<JpegSegmentType>().Where(type => type.CanContainMetadata()).ToList();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the Cast<JpegSegmentType>() needed on this path? (I think the GetValues() returns a JpegSegmentType[] already ?)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. I'll fix it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AOT analyser warnings in the Tiff reader code
2 participants