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

Test with VB/F# to make sure expression tree differences are handled #14572

Closed
1 task done
ajcvickers opened this issue Jan 31, 2019 · 15 comments · Fixed by #34541
Closed
1 task done

Test with VB/F# to make sure expression tree differences are handled #14572

ajcvickers opened this issue Jan 31, 2019 · 15 comments · Fixed by #34541
Labels
area-F# area-query area-vb closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. help wanted This issue involves technologies where we are not experts. Expert help would be appreciated. poachable punted-for-3.0 type-enhancement
Milestone

Comments

@ajcvickers
Copy link
Member

ajcvickers commented Jan 31, 2019

This is in particular reference to removal of Relinq since it was doing some normalization in this area.

@bricelam
Copy link
Contributor

bricelam commented Feb 1, 2019

These re-linq transformations handled things like this.

@ajcvickers ajcvickers added this to the 3.0.0 milestone Feb 1, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0, Backlog Jun 28, 2019
@smitpatel smitpatel removed their assignment Aug 7, 2019
@ajcvickers ajcvickers added the help wanted This issue involves technologies where we are not experts. Expert help would be appreciated. label Sep 2, 2019
@bricelam bricelam self-assigned this Jun 5, 2020
@bricelam bricelam modified the milestones: Backlog, MQ Aug 26, 2020
@ajcvickers ajcvickers modified the milestones: MQ, Backlog Sep 17, 2020
@ajcvickers ajcvickers removed this from the Backlog milestone Nov 10, 2021
@ajcvickers
Copy link
Member Author

Note from triage: add a cross-language functional tests project.

bricelam added a commit to bricelam/efcore that referenced this issue Apr 25, 2023
bricelam added a commit to bricelam/efcore that referenced this issue Apr 26, 2023
@bricelam
Copy link
Contributor

I've added a VB test suite with coverage for things that we've fixed (string comparisons and checked arithmetic).

We still have a few known bugs:

But I think we can say that the VB part of this issue is done.

@bricelam bricelam removed their assignment Jul 8, 2023
@gaglia
Copy link

gaglia commented Jan 30, 2024

Hi,

Is there any news regarding this problem?

We are testing with EF 8 and still encounter the same problems.
The problem is very impactful in our opinion, we have just finished a huge migration work from Entity Framework 4 to .NET 8 + EF 8 but we are experiencing big problems for certain queries due to these mistranslations for VB.NET

Thank you

@roji
Copy link
Member

roji commented Jan 30, 2024

@gaglia this is a general issue tracking improving testing for VB/F# - please vote on specific translation issues so that we know what you're blocked by. See the issues linked to just above; if you're running into something that isn't already covered, please open a new issue with a minimal code sample that shows the problematic query.

@gaglia
Copy link

gaglia commented Jan 30, 2024

Hi @roji

I'm experiencing the same problem already reported in issue #31578.

Wrong translation of WHERE with simple filters for string fields

If you need any other information, just let me know.
Thank you

@roji
Copy link
Member

roji commented Jan 30, 2024

@gaglia then be sure to vote on #31578, which currently has just one vote - that's a big part of how we choose which issues to prioritize.

koenigst added a commit to koenigst/efcore that referenced this issue Aug 27, 2024
- Added the project EFCore.FSharp.FunctionalTests
- Created a fixture for the Northwind database
- Implemented a sample test analogous to the Visual Basic tests

Fixes dotnet#14572
@koenigst
Copy link
Contributor

I created a test project for F# in #34541. I don't know of any issues concerning difference in syntax trees with F# so I created a sample test. Are any issues known that I could test?

@roji
Copy link
Member

roji commented Aug 27, 2024

@koenigst I don't think we're aware of any specific problems, but then again EF has generally received little usage under F#, so it may be that the issues haven't been discovered/reported yet...

roji pushed a commit that referenced this issue Aug 27, 2024
- Added the project EFCore.FSharp.FunctionalTests
- Created a fixture for the Northwind database
- Implemented a sample test analogous to the Visual Basic tests

Fixes #14572
@roji roji modified the milestones: MQ, 10.0.0 Aug 27, 2024
@roji roji added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Aug 27, 2024
@bricelam
Copy link
Contributor

bricelam commented Aug 27, 2024

@koenigst The area-F# label and efcore/EFCore.FSharp repo might have a few known issues in them.

@koenigst
Copy link
Contributor

@bricelam The area-F# label has no open or closed issues concerning query translation. I found one, two issues in efcore/EFCore.FSharp. To test them the test project would need to take a dependency on that project which I would find weird. Take the dependency or leave it for now?

@roji
Copy link
Member

roji commented Aug 28, 2024

Ah, interesting... So it seems that the EFCore.FSharp package has actual method translators to take care of some F# expression tree variance. I'd need to look (and probably discuss with the team), but I think we should consider bringing these into EF itself (we already have various normalization support for VB.NET constructs in the box). These also may make more sense as preprocessing normalization rather than a method translators.

Otherwise, for the time being, it seems that EFCore.FSharp is necessary for proper query translation of some constructs, so I think it makes sense to take a dependency on it from the F# functional test project - you can go ahead and do that.

@roji
Copy link
Member

roji commented Aug 28, 2024

FYI opened #34552 to track moving the query translation stuff from EFCore.FSharp into EF.

@koenigst
Copy link
Contributor

Otherwise, for the time being, it seems that EFCore.FSharp is necessary for proper query translation of some constructs, so I think it makes sense to take a dependency on it from the F# functional test project - you can go ahead and do that.

The package EntityFrameworkCore.FSharp does not exist in the dnc package sources. I don't have the rights to mirror the package from nuget.org.

I will mention the two solved issues in #34552 and not pursue them here.

@roji
Copy link
Member

roji commented Aug 30, 2024

@koenigst makes sense, thanks for looking at it. The right thing to do is probably to bring in the query fixes from the external package into the core as per #34552.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-F# area-query area-vb closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. help wanted This issue involves technologies where we are not experts. Expert help would be appreciated. poachable punted-for-3.0 type-enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants