I've been flattered by all the #ScalaThankYou messages this week, but they've revealed to me that there are many more people than I realised quietly using Magnolia for generic derivation! If you're using it and I might not know you are, please let me know so I can compile a list!
-
Show this thread
-
Equally, if you're *not* using Magnolia for generic derivation, I'd be interested to know that too, especially if you tried it and it didn't work out for some reason: I'd like to do my best to remove those reasons, if I can!
3 replies 0 retweets 3 likesShow this thread -
Replying to @propensive
Happy user in Caliban! There's only 1 thing that could be improved: error reporting. When there are many chained implicits involved (deeply nested case classes), errors get cryptic. Ideally it would tell exactly which deeply nested type is missing an instance.
1 reply 0 retweets 2 likes -
Replying to @ghostdogpr
Have you seen the derivation "stack traces", like the one 2/3 of the way down this page: https://propensive.com/opensource/magnolia … ? These don't appear if you're deriving implicitly, but if you explicitly request a derivation (e.g. something like Type.gen[Type]), you should see it.
1 reply 0 retweets 0 likes -
Replying to @propensive
Yeah, my advice in case of errors is to add the derivation explicitly but most users wish it would work out without any boilerplate
1 reply 0 retweets 0 likes -
Replying to @ghostdogpr
If I remember correctly, the problem was that it resulted in lots of false positives when Magnolia-derived implicits were considered for types which were later satisfied by different implicits.
1 reply 0 retweets 0 likes -
Replying to @propensive @ghostdogpr
Unfortunately, it's not clear to the Magnolia macro that there won't be some other implicit in scope which the compiler tries later, that will conform to the required type. It was a long time ago I did this, though...
2 replies 0 retweets 0 likes -
Replying to @propensive
I see, thanks for the insights! I recently added an @implicitNotFound annotation to guide users on how to deal with this, hopefully it’ll help. Again thanks for your work on this and I’m glad I’ll get to meet you at Functional Scala!
1 reply 0 retweets 1 like
Cool, I'll see you there—make sure you find me at some moment and introduce yourself!
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.