efcore / EFCore.FSharp

Adds F# design-time support to EF Core
MIT License
228 stars 26 forks source link

switch over to .net 8 #162

Open crimsonhawk47 opened 3 months ago

crimsonhawk47 commented 3 months ago

Proposed Changes

Support .NET 8

Types of changes

What types of changes does your code introduce to EFCore.FSharp? Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Fixes #155

ErikEJ commented 3 months ago

Assume you mean: Fixes #155 ?

ErikEJ commented 3 months ago

Looks like the actions need an update...

simon-reynolds commented 3 months ago

@crimsonhawk47 Can you please update https://github.com/crimsonhawk47/EFCore.FSharp/blob/net8-support/.github/workflows/build.yml on your branch from dotnet-version: '6.x' to dotnet-version: '8.x'

ErikEJ commented 3 months ago

I think maybe a lot of changes are needed for scaffolding??

ErikEJ commented 3 months ago

Looks like the action needs a major overhaul.

simon-reynolds commented 3 months ago

Tbh, I'm looking at this for the first time in a long while and wondering how it can keep up with base EF Core The switch to T4 templates for scaffolding has kind of messed with this, T4 isn't supported in F# so options are either keep a totally separate implementation or rewrite in C#

I won't be going with a complete rewrite because I'm working on a Mac and the template engine in VS for Mac is outdated and the product is being retired anyway. Keeping the current implementation and trying to port functionality sounds like the only option I have but it's a major time investment for me so updates will be sporadic

ErikEJ commented 3 months ago

@simon-reynolds So you suggest releasing a .NET 8 build where scaffolding might not fully work.

crimsonhawk47 commented 3 months ago

I'm interested in helping with this, but would like a few details.

simon-reynolds commented 3 months ago

Visual Studio for Mac is being retired

Working with C# would make T4 functionality a bit more straightforward but we'd need to split it into two projects then as we still need F# code for mapping things like option types in queries. That would still also not solve the problem of trying to get T4 templates running on a non-Windows system as the dotnet t4 tool uses a different version of the text templating engine which causes differences in the generated code.

I've been doing some work on trying to update the existing implementation to account for API changes for .net 8 but it's not something I have a lot of time to devote to. If you're interested in helping out with the porting, I would absolutely love to have the help

I'll push my local changes to a branch later and update you here

simon-reynolds commented 3 months ago

Changes so far are on https://github.com/efcore/EFCore.FSharp/tree/net8-support It's very much work in progress at the moment and does not currently build as I'm working through the changes to EF Core's internal API's but any help would be very welcome