Skip to content

[4.1.0] experience report updating Marten #2607

Closed

Description

@baronfel

Steps to reproduce

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

Again, these may be entirely intended changes, I just wanted to bring them up to get an explicit yes or no on that point.

Further technical details

Npgsql version: 4.1.0-preview2
PostgreSQL version: 10
Operating system: Mac OSX Mojave 10.14.6

Activity

  1. YohDeadfall commented on Sep 5, 2019

    @YohDeadfall
    Contributor

    Thanks for the report! This changes are not intentional and we should keep binary compatibility until version 5.

  2. baronfel commented on Sep 5, 2019

    @baronfel
    Author

    They seem like rather simple fixes, if you like I could prepare a PR with just these two changes.

  3. baronfel commented on Sep 6, 2019

    @baronfel
    Author

    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.

  4. YohDeadfall commented on Sep 7, 2019

    @YohDeadfall
    Contributor

    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.

  5. added this to the 4.1 milestone on Sep 7, 2019
  6. roji commented on Sep 8, 2019

    @roji
    Member

    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.

  7. roji commented on Sep 12, 2019

    @roji
    Member

    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.

  8. YohDeadfall commented on Sep 12, 2019

    @YohDeadfall
    Contributor

    @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.

  9. roji commented on Sep 12, 2019

    @roji
    Member

    Sure thing, I'll take care of it soon. We'll probably revert the entire change.

  10. self-assigned this
    on Sep 18, 2019
  11. added a commit that references this issue on Sep 18, 2019
    c141354
  12. added a commit that references this issue on Sep 18, 2019
    96a204a
  13. baronfel commented on Sep 18, 2019

    @baronfel
    Author

    Thanks @roji and @YohDeadfall for your work here!

  14. added theissue type on Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions