mongodb-haskell / mongodb

MongoDB driver for Haskell
http://hackage.haskell.org/package/mongoDB
Apache License 2.0
172 stars 47 forks source link

Make current driver compatible with the OP_MSG protocol #137

Closed kfiz closed 2 years ago

kfiz commented 2 years ago

Starting with mongodb v6 the OP_MSG protocol is the only accepted message protocol that is accepted by mongodb. All prior protocols are deprecated. This commit implements the protocol keeping the current client facing API intact.

Closes #135, #123

kfiz commented 2 years ago

@VictorDenisov Ping. Could you have a look at this? All tests have successfully passed on macOS x86_64 running ghc 9.2.4. This would need to be verified against older versions of mongoDB , older versions of ghc and on different architectures.

VictorDenisov commented 2 years ago

Yep. I'll take a look over the weekend.

VictorDenisov commented 2 years ago

It looks like it'll take longer than I expected. In progress ...

VictorDenisov commented 2 years ago

@kfiz if you make changes to the PR could you please add new commits. At least until we are done with this PR. We can squash them when we merge the PR.

kfiz commented 2 years ago

Ok. But I think I'm done with the changes for now. Hopefully this was not causing to much trouble.

VictorDenisov commented 2 years ago

Looks good and good job keeping the existing code intact. I'll merge your change tomorrow. It almost feels like we can only bump patch version. There was no change of the external interfaces. Do you agree?

kfiz commented 2 years ago

Thanks. I agree, bumping the patch version is enough. No changes to external interfaces were made.

jjba23 commented 2 years ago

@VictorDenisov @kfiz and everyone involved, thanks for your awesome work. Maybe in the README it could be added a note specifying the version compatibility of MongoDB ? Do you also know what the process looks like for someone using Persistent lib + Mongo DB to use the latest versions?

VictorDenisov commented 2 years ago

I would expect little compatibility issues. No public interfaces have changed. Or are you talking about a different compatibility?

kfiz commented 2 years ago

Do you also know what the process looks like for someone using Persistent lib + Mongo DB to use the latest versions?

I would assume that the Persistent maintainers would just have to make the latest version of this driver available as the default mongoDB backend. You would have to update your version of mongoDB of course if you haven't done that yet, if you want to try this out with mongoDB v6.0.