denis-ivanov / EntityFrameworkCore.ClickHouse

ClickHouse provider for Entity Framework Core.
https://clickhouse.tech/
23 stars 5 forks source link

Dotnet 9 upgrade bug #66

Open chneau opened 1 week ago

chneau commented 1 week ago

Hello,

I get this issue on the logs:

System.TypeLoadException: Method 'get_LockReleaseBehavior' in type 'ClickHouse.EntityFrameworkCore.Migrations.Internal.ClickHouseHistoryRepository' from assembly 'EntityFrameworkCore.ClickHouse, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

It seems related to this issue https://stackoverflow.com/questions/79147519/unable-to-create-a-dbcontext-in-entity-framework-core-project-using-oracledb-whi

I don't know much about this kind of errors. It seems it's either an issue with the v9 of dotnet or this nugget needs to be updated to handle dotnet9 ?

Happy to help if I can.

Kind regards, Charles

chneau commented 1 week ago

Seems like this nugget needs to be compiled for 9 as per this comment https://github.com/dotnet/efcore/issues/35030#issuecomment-2452386021

chneau commented 1 week ago

Naively updating to 9 using dotnet outdated results in this change https://github.com/chneau/EntityFrameworkCore.ClickHouse/commit/fa7367c7b97971420e6b20677962cbf335c877cc but results in multiple build errors I can't fix myself.

chneau commented 1 week ago

I spent a bit of time to have the build up but then of course the test is completely broken https://github.com/chneau/EntityFrameworkCore.ClickHouse I think this database Lock they introduce in dotnet 9 is the one that will need implementation to make the test pass https://github.com/chneau/EntityFrameworkCore.ClickHouse/blob/9bb0069d028d9a1bbdbf36300765ea170202c83c/EntityFrameworkCore.ClickHouse/Migrations/Internal/ClickHouseHistoryRepository.cs#L95 , but I'm not going to lie I have literally no idea how it works. I've googled around and found how pgsql does it: https://github.com/npgsql/efcore.pg/blob/main/src/EFCore.PG/Migrations/Internal/NpgsqlHistoryRepository.cs#L40 but it really does not help me