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

Fix: Resolve ambiguity in TryGetElementType() for Mono runtime (#3395) #3399

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

medhatiwari
Copy link

@medhatiwari medhatiwari commented Dec 5, 2024

Summary

Fixes #3395

This PR addresses a discrepancy in the Mono runtime that adds extra generic interfaces, such as IEnumerable<int>, for arrays and collections. This behavior causes failures in the EFCore.PG test suite, particularly in the TryGetElementType() logic used for interface resolution.

@uweigand @giritrivedi @saitama951

@medhatiwari medhatiwari force-pushed the fix-trygetelementtype-mono branch from c503bad to 6cb9612 Compare December 5, 2024 19:07
@giritrivedi
Copy link

@roji
Can azure pipeline be run here to see if this workaround is not causing any regressions ?

@roji
Copy link
Member

roji commented Dec 6, 2024

@giritrivedi I've triggered the CI, but I'm not sure it's appropriate to merge this rather than just having it fixed on the mono side. And by the way, this specific function is a copy-paste from the EF source code, so the same problem should exist there.

@giritrivedi
Copy link

Thanks @roji. We will work on giving a fix in Mono.

@roji
Copy link
Member

roji commented Dec 6, 2024

@giritrivedi OK, that's great to hear! Are you OK with me closing this PR and #3395 then?

@giritrivedi
Copy link

I will let @uweigand comment on this.

@uweigand
Copy link

uweigand commented Dec 6, 2024

I agree the right thing is to fix this in the runtime (note this is about the Mono flavour of the dotnet runtime, not the classic Mono standalone project). However, it may take quite a bit of time for any runtime fix to actually become available in the official releases customers are using. Therefore, we were wondering if it would be acceptable to have a workaround in this project for the time being.

@giritrivedi
Copy link

@roji Can this be merged to ensure customers do not face this issue until a better fix is provide in Mono runtime ?

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.

Ambiguity in NpgsqlArrayValueConverter Causes Test Failures on Mono Runtime
4 participants