We are looking to transition to Scala 3, and have noticed that the MongoDB Scala Driver is only available for versions 2.x. Is there a timeline on when we could expect to see the MongoDB Scala Driver support Scala 3?
Hi @Richard_Jones,
We are currently blocked by gradle#16527 which is preventing our build system from creating the artifacts.
We are keeping an eye on that ticket and will look to publish the artifacts once support has been added.
Ross
Hi, what is the status of Scala 3 support?
Given Gradle supports scala 3 for some time, is this driver going to expand its support for it?
Hi, we are planning to add Scala 3 support in the coming months. We’ve filed JAVA-4181 for this work, feel free to follow along on that ticket.
For what it’s worth, I’ve just migrated from the Scala driver to the Reactive Streams Java driver in order to be able to upgrade from Scala 2 to Scala 3:
This oolong library provides a Scala 3 wrapper for mongo-scala-driver-bson. It’s part of the query generator library, but bson-only artifacts are also published.
It is implemented purely by type class derivation in Scala 3 and completely replaces the macros in mongo-scala-driver.
Any news on this topic? Is there the plan to add scala3 support in next releases?
Hi folks - Scala 3 is very much still on the radar. We started some foundational work towards supporting this new language version in JAVA-5261, but still need to rewrite the bson-scala macros (see JAVA-5453), as well as some other work in the linked epic. We’re hoping to prioritize it in the coming quarters. If you would like to chat through your specific use case(s), please drop a comment on the linked epic and we can discuss. Thanks!
I had the same challenge when working with MongoDB in Scala 3, as the official MongoDB Scala Driver currently only supports Scala 2.x.
To bridge this gap, I developed MongoScala3Codec, a Scala 3-compatible BSON codec generator, inspired by the macro codec in the MongoDB Scala 2 driver. It enables seamless serialization/deserialization of case classes in Scala 3 using macros.
You can check it out here: GitHub - MongoScala3Codec.
As for an official MongoDB driver for Scala 3, I haven’t seen an official timeline yet, but I’d love to see an update from the MongoDB team on their plans!
Thanks for sharing your BSON codec generator. I haven’t had a chance to try it out, but I added a note to JAVA-5261 about it.
Scala 3 remains on the roadmap, but due to limited resources and other priorities, our JVM team hasn’t had a chance to prioritize it yet. I’ll be reviewing this with the team again though, as it seems the signal is getting stronger that the community is moving in this direction.
New & Unread Topics
Topic | Replies | Views | Activity |
---|---|---|---|
IPv6 compatibility across frameworks | 1 | 556 | May 2024 |
ExpressionSearchDefinition plan? | 0 | 165 | Jul 2024 |
Query Caching, why does only the Ruby driver do it? | 0 | 17 | Nov 2024 |
Mongo ChangeStream & changeStreamSplitLargeEvent in golang example | 0 | 64 | Dec 2024 |
SerializerRegistry is ignored while using EF Core | 1 | 54 | Dec 2024 |