You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was initially tinkering with updating Npgsql only to 4.1.0 in my application and ran into the first issue below, so I then tried to update Marten to use the 4.1.0-preview2 and noticed another change that I wanted to bring to your attention that prevent drop-in updates, in case some were unintentional:
The issue
NpgsqlCommand.ExecuteReader(): NpgSqlDataReader no longer exists. The only version of this method that exists takes a CommandBehavior parameter which is supplied by default. That makes this a source-compatible, but not binary-compatible change.
I found another while testing the Npgsql.EntityFrameworkCore 2.2.4 package:
the member Npgsql.TypeHandling.NpgsqlTypeHandlerFactory Npgsql.TypeMapping.NpgsqlTypeMapping.get_TypeHandlerFactory() doesn't exist anymore. Instead, the return type of the getter is Npgsql.TypeHandling.NpgsqlTypeHandlerFactory. The result of this is that using 4.1.x with Npgsql.EntityFramework 2.x fails due to MethodNotFound exceptions.
This one I'm not so sure about how to fix. The others were purely additive, this one implies some larger architecture change from concrete classes to interface return types. The abstract NpgsqlTypeHandlerFactory type is ust gone now.
Type handling is a different story. While it's a public API there is no guaranties that breaking changes here will happen only in major releases, but since it breaks EF 2.x we should investigate probably on EF side. Will try to take a look ASAP.
Agree that Npgsql 4.1 should definitely work with EF 2.x - a separate issue for this may be better. @YohDeadfall let me know what you find, otherwise I'll take a look.
The NpgsqlTypeMapping.TypeHandlerFactory issue was introduced in 8691e26: the property's type was changed from NpgsqlTypeHandlerFactory to INpgsqlTypeHandlerFactory. I'll revert this change soon.
BTW it won't be possible to use EF Core 2.x with Npgsql.NetTopologySuite 4.1.0 - specifically the spatial plugin (see #1023). This is expected and there's no way around it. Will add a breaking change note in the release notes.
Activity
YohDeadfall commentedon Sep 5, 2019
Thanks for the report! This changes are not intentional and we should keep binary compatibility until version 5.
baronfel commentedon Sep 5, 2019
They seem like rather simple fixes, if you like I could prepare a PR with just these two changes.
baronfel commentedon Sep 6, 2019
I found another while testing the Npgsql.EntityFrameworkCore 2.2.4 package:
Npgsql.TypeHandling.NpgsqlTypeHandlerFactory Npgsql.TypeMapping.NpgsqlTypeMapping.get_TypeHandlerFactory()doesn't exist anymore. Instead, the return type of the getter isNpgsql.TypeHandling.NpgsqlTypeHandlerFactory. The result of this is that using 4.1.x with Npgsql.EntityFramework 2.x fails due to MethodNotFound exceptions.This one I'm not so sure about how to fix. The others were purely additive, this one implies some larger architecture change from concrete classes to interface return types. The abstract NpgsqlTypeHandlerFactory type is ust gone now.
YohDeadfall commentedon Sep 7, 2019
Type handling is a different story. While it's a public API there is no guaranties that breaking changes here will happen only in major releases, but since it breaks EF 2.x we should investigate probably on EF side. Will try to take a look ASAP.
roji commentedon Sep 8, 2019
Agree that Npgsql 4.1 should definitely work with EF 2.x - a separate issue for this may be better. @YohDeadfall let me know what you find, otherwise I'll take a look.
roji commentedon Sep 12, 2019
The NpgsqlTypeMapping.TypeHandlerFactory issue was introduced in 8691e26: the property's type was changed from NpgsqlTypeHandlerFactory to INpgsqlTypeHandlerFactory. I'll revert this change soon.
BTW it won't be possible to use EF Core 2.x with Npgsql.NetTopologySuite 4.1.0 - specifically the spatial plugin (see #1023). This is expected and there's no way around it. Will add a breaking change note in the release notes.
YohDeadfall commentedon Sep 12, 2019
@roji If you have time to take this, do it. I'll try to concentrate on other issues assigned to me and related to the ADO.NET driver.
roji commentedon Sep 12, 2019
Sure thing, I'll take care of it soon. We'll probably revert the entire change.
Revert breaking change in NpgsqlTypeMapping.TypeHandlerFactory
Revert breaking change in NpgsqlTypeMapping.TypeHandlerFactory
baronfel commentedon Sep 18, 2019
Thanks @roji and @YohDeadfall for your work here!