mongodb-generic-repository icon indicating copy to clipboard operation
mongodb-generic-repository copied to clipboard

Use MongoDB driver 3.x

Open miszu opened this issue 11 months ago • 6 comments

Hey,

thanks for the great work on this package, it's super useful. The latest version of MongoDB driver is 3.1, do you plan to migrate to it in mongodb-generic-repository? I'm happy to give it a shot as well, but first it'd be great to hear if that's on the roadmap.

From the 3.0 release notes it looks like supported platforms will need to change too:

The driver drops support for .NET Core 2.x and .NET Framework 4.6. You must upgrade to .NET Core 3.x or later, or .NET Framework 4.7.2 or later.

Cheers, Michał

miszu avatar Jan 07 '25 08:01 miszu

During the last upgrade process onto 2.30, I checked how easily it would have been to migrate to 3.x . Unfortunately, there's 2 big issues to tackle here:

  1. The API surface changes on this major version switch.
  2. The downstream impact it may have on users' projects if we enforce the dependency.

Ideally, it should be possible to introduce some variables compile flags to switch between the 2.x and 3.x lines and have it all depend on the dependency version. Else, it's probably needed to release a 3.x line of the package as a whole.


Similarly, it would be best if the supported platforms could follow those of the MongoDB Driver, but that is ultimately a choice on the package maintainer if they need to broaden support.

omni-htg avatar Jan 08 '25 13:01 omni-htg

Hello both, happy New Year and thanks for reaching out and your previous contributions, they are very much appreciated. Yes I think this current package should be migrated to handle the new 3.1 driver, we'll bump the major version accordingly. Out of the options @omni-htg mentioned, I'm leaning towards creating a 3.x release for this. I also think the package should support all the supported platforms of the official Driver, I've been trying to ensure teams who are still running apps on older .net frameworks can benefit from this - so I'd like us to continue to do so.

alexandre-spieser avatar Jan 13 '25 09:01 alexandre-spieser

@alexandre-spieser Please publish a version supporting version 3+ thank you!

madsquist avatar Jan 19 '25 10:01 madsquist

+1

Nucs avatar Jan 23 '25 05:01 Nucs

Hello, unfortunately I do not have much capacity at the moment, if someone wants to give it a go they are more than welcome to submit a PR that I can review and tweak.

Here is an example of a PR by @omni-htg we last merged, to give you an idea of what I'm after. https://github.com/alexandre-spieser/mongodb-generic-repository/pull/62

Feel free to take inspiration from this.

alexandre-spieser avatar Jan 27 '25 11:01 alexandre-spieser

@alexandre-spieser I submitted PR #65 to upgrade the MongoDB.Driver package to version 3.3.0.

gBritz avatar Apr 11 '25 02:04 gBritz

PR merged and new version released, thanks again @gBritz, much appreciated!

alexandre-spieser avatar Aug 11 '25 11:08 alexandre-spieser