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

Array translation improvements #2028

Merged
merged 1 commit into from
Oct 8, 2021
Merged

Conversation

roji
Copy link
Member

@roji roji commented Oct 8, 2021

And redo array/list tests

Closes #2026

@roji roji force-pushed the MoarArrayTranslations branch from 8370f16 to 856b46f Compare October 8, 2021 14:29
@roji roji enabled auto-merge (squash) October 8, 2021 14:29
@roji roji force-pushed the MoarArrayTranslations branch from 856b46f to 1556d9a Compare October 8, 2021 14:33
And redo array/list tests

Closes npgsql#2026
@roji roji force-pushed the MoarArrayTranslations branch from 1556d9a to 7cd18ec Compare October 8, 2021 14:45
@roji roji merged commit 80a6846 into npgsql:main Oct 8, 2021
@roji roji deleted the MoarArrayTranslations branch October 8, 2021 14:55
private static readonly MethodInfo SequenceEqual =
#region Methods

private static readonly MethodInfo Array_IndexOf1 =
Copy link

@hez2010 hez2010 Oct 8, 2021

Choose a reason for hiding this comment

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

I recommend using below code to get definite method overload.

typeof(Array).GetMethod(nameof(Array.IndexOf), 1, BindingFlags.Public | BindingFlags.Static | BindingFlags.DeclaredOnly, null, CallingConventions.Any, new[] { Type.MakeGenericMethodParameter(0).MakeArrayType(), Type.MakeGenericMethodParameter(0) }, null)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @hez2010 you're right. This provider (as well as EF Core itself) has lots of places which aren't friendly to AOT/trimming, so I'll be doing a concentrated pass for this and other problematic practices. I've opened #2031 to track this specific suggestion.

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.

Array translation improvements
2 participants