Update to .NET 10 / EF Core 10#1
Closed
techiedesu wants to merge 16 commits into
Closed
Conversation
- global.json: SDK 6.0.100 -> 10.0.100 - All projects: net6.0/net5.0 -> net10.0 - Package version: 6.0.0-local001 -> 10.0.0-local001
- actions/checkout v2 -> v4 - actions/setup-dotnet v1.9.0 -> v4 - dotnet-version: 6.x -> 10.x - Rename "Setup .NET Core SDK" to "Setup .NET SDK" - Remove obsolete DOTNET_ROOT workaround comments
dotnet-tools.json: - paket: 6.0.13 -> 10.3.1 - fantomas-tool 4.5.6 -> fantomas 6.3.15 - reportgenerator: 4.2.15 -> 5.4.1 paket.dependencies: - FSharp.Core: 6.0.1 -> 9.0.100 - Microsoft.EntityFrameworkCore.*: ~> 6.0.0 -> ~> 10.0.0 - FSharp.Compiler.Service: 41.0.1 -> 43.9.100 - FAKE: 5.20.4 -> 6.1.4 - Octokit: 0.48 -> >= 13.0.1 - Microsoft.NET.Test.Sdk: 17.0.0 -> 17.12.0
EntityFrameworkExtensions: - NamespaceComparer moved to Microsoft.EntityFrameworkCore.Design - Remove GetEntityTypeErrors (removed in EF Core 7) EFCoreFSharpServices: - ICSharpEntityTypeGenerator/ICSharpDbContextGenerator interfaces removed in EF Core 7; register concrete types directly FSharpHelper (ICSharpHelper interface): - Fragment: MethodCallCodeFragment -> IMethodCallCodeFragment - Add Fragment overloads: IMethodCallCodeFragment+indent, NestedClosureCodeFragment, PropertyAccessorCodeFragment, AttributeCodeFragment - Add Identifier<T> overload with IDictionary - Add Lambda(IEnumerable<IProperty>) overload - Add Literal: DateOnly, TimeOnly, BigInteger, List<T>, Dictionary - Literal(Enum) gains fullName parameter - Namespace: add ParamArray attribute - Add XmlComment, Arguments, GetRequiredUsings, Statement, Expression - Fix AppendLine(FormattableString) ambiguity with type annotation FSharpDbContextGenerator: - ISequence.ClrType -> .Type - Remove ScaffoldingAnnotationNames.EntityTypeErrors - Remove GetEntityTypeErrors loop - Convert ICSharpDbContextGenerator interface to member FSharpEntityTypeGenerator: - GetPropertiesAndNavigations -> GetMembers - Convert ICSharpEntityTypeGenerator interface to member FSharpModelGenerator: - Use concrete generator types instead of removed interfaces - ScaffoldedFile: named-param constructor -> positional constructor FSharpMigrationsScaffolder: - Save: add dryRun parameter, guard file writes - Fix File.WriteAllText ReadOnlySpan<char> overload ambiguity FSharpSnapshotGenerator: - Fragment(c, builderName) -> Fragment(c, builderName, false) (typeQualified parameter now required)
F# cannot handle C# covariant return types used by RelationalTypeMappingSource in EF Core 10 (new virtual methods with sealed bridge methods). The F# compiler doesn't see the bridge methods as implementing abstract members from TypeMappingSourceBase. Move TestRelationalTypeMappingSource to a C# project and have the F# test project reference it. Also update the F# stub to inherit from the C# base class and fix Clone -> WithStoreTypeAndSize rename.
Mocks.fs: - Add IHistoryRepository members: Create, CreateAsync, LockReleaseBehavior, AcquireDatabaseLock, AcquireDatabaseLockAsync SqlServerTestHelpers.fs, RelationalTestHelpers.fs: - UseProviderOptions now returns DbContextOptionsBuilder (was void in EF Core 6) FakeDbConnection.fs: - Remove AppendIdentityWhereCondition, AppendSelectAffectedCountCommand, AppendRowsAffectedWhereCondition (removed from UpdateSqlGenerator) BuildReference.fs: - Replace CompileToDynamicAssembly with Compile + Assembly.Load (CompileToDynamicAssembly removed in FSharp.Compiler.Service 43) - Shared FSharpChecker instance with lock for thread safety
FSharpMigrationOperationGeneratorTest: - SqlServerTypeMappingSource: pass SqlServerSingletonOptions() instead of Unchecked.defaultof (NRE in constructor) - WKTReaderType -> WktReaderType - Add namespace declaration to generated F# code - Type annotations for Assembly/MethodInfo reflection calls FSharpMigrationsGeneratorTest: - SqlServerSingletonOptions() for SqlServerTypeMappingSource - Filter RelationalAnnotationNames to string fields only - SortedDictionary -> Dictionary for DbFunctions - FinalizeModel: add skipValidation for annotation check tests - Update annotation exclusion lists with ~35 new EF Core 7-10 annotations (stored procedures, mapping strategies, JSON, etc.) - HasComment -> HasAnnotation for entity type comment - Remove DefiningQuery (removed in EF Core 7) - configure -> configureConventions parameter rename FSharpMigrationsScaffolderTest: - SqlServerSingletonOptions() for SqlServerTypeMappingSource - MigrationsModelDiffer dependencies: IChangeDetector -> IRelationalAnnotationProvider, IUpdateAdapterFactory -> IRowIdentityMapFactory - MigrationsScaffolder: add 4 new required dependencies - Save: add dryRun=false parameter ModelCodeGeneratorTestBase: - CreateConventionBuilder: use addServices parameter instead of passing stripped-down contextServices - Remove GetEntityTypeErrors call - FinalizeModel: remove skipValidation (use default validation)
- Changelog.New: add missing 5th parameter (references list) - Regex.IsMatch: add type annotation to resolve overload ambiguity
- Run fantomas on all source, test, and build files (48 files formatted) - Update SDK version requirements in README.md, GETTING_STARTED.md, and docsSrc/Tutorials/Getting_Started.md (.NET 5.0 -> 10.0) - Add CHANGELOG.md entry for 10.0.0 release
- Add explicit fantomas formatting settings to .editorconfig to prevent mass reformatting on future fantomas upgrades - Update .NET SDK download link to https://dotnet.microsoft.com/en-us/download
- Dockerfile: debian buster -> bookworm, update lib dependencies - install-dotnets.sh: remove hardcoded .NET 5.0, rely on global.json - devcontainer.json: extensions -> customizations.vscode.extensions - Remove deprecated FSharp.fsacRuntime setting from VS Code configs
ae4243d to
64d60b6
Compare
- FSharp.Core: exact 9.0.100 -> >= 9.0.100 (fixes NU1608 warning when consumers use a newer FSharp.Core from their SDK) - Rename build/net5.0 -> build/net10.0 in NuGet package
- Fix hardcoded net6.0 TFM in docsTool/Program.fs (should be net10.0) - Move CSharpInterop project to paket (was using hardcoded preview EF Core version) - Update AssemblyInfo.fs files from 6.0.x to 10.0.0 - Replace deprecated PackageLicenseUrl with PackageLicenseExpression (MIT) - Replace failwith "todo" stubs with proper no-op implementations in FakeDiagnosticsLogger - Remove commented-out TryAddProviderSpecificServices dead code - Format docsTool/templates/types.fs with fantomas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Checklist
Test plan
🤖 Generated with Claude Code