Replies: 2 comments 10 replies
-
cc @jatcwang , wdyt? |
Beta Was this translation helpful? Give feedback.
-
The intention of
(This wasn't the case in RC5 - you had to derive |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed that in the current version of Doobie
fromPutOption
andfromGetOption
have lower priority thanoptionalFromWrite
andfromReadOption
correspondingly:doobie/modules/core/src/main/scala/doobie/util/write.scala
Lines 175 to 187 in 273a4cb
doobie/modules/core/src/main/scala/doobie/util/read.scala
Lines 175 to 187 in 273a4cb
Out of curiosity, I commended out lines with
fromPutOption
andfromGetOption
and re-built the project (for all Scala versions). No build errors appeared. Then I ran all the tests for all Scala versions. No errors whatsoever.Taking into account that there are also
fromPut
/fromGet
derivers in the scope, it looks likefromPutOption
/fromGetOption
are not really working and have no effect on the derivation process – they just don't seem getting any chance to be picked by the compiler. So I wonder shouldn't these methods be rather prioritized overoptionalFromWrite
andfromReadOption
?On the other hand,
optionalFromWrite
andfromReadOption
look a bit dubious themselves. Having them, now it is possible to constuct something like this:which doesn't seem making any sense. Apparently, that was not possible with
fromPutOption
andfromGetOption
only.To be honest, I'm not sure if
optionalFromWrite
andfromReadOption
are really necessary – I couldn't come up with any practical purpose for them. But I might be missing something out. But it looks like there something can be improved in regards to these two pairs of derivation methods.Beta Was this translation helpful? Give feedback.
All reactions