Replies: 5 comments 8 replies
-
Linking the blocker for the update Cats-Core to 2.12.0 on the Cats-Effect side for interested readers. typelevel/cats-effect#4076 UPD. As we discussed in the GitHub issue above, this is much more likely not caused by the Cats-Effect. :sad_pepe: Anyway, nothing else in the build brings a different version of Cats-Core causing the |
Beta Was this translation helpful? Give feedback.
-
@danicheg do you have a minimal repro for this issue? redis4cats 1.7.2 seems to depend on that exact CE version (3.5.7) so I don't see how it'd have any incompatibilities at all. redis4cats does have a dependency on cats-laws and testkit 2.12.0 in its tests:
but they're not part of any modules published by redis4cats, as far as I can tell. |
Beta Was this translation helpful? Give feedback.
-
ok I think I'm onto something. This is definitely a problem with how redis4cats was published, i.e. we can possibly shift the blame to the publishing side of sbt 😅 I downgraded all the transitive dependencies of all modules in redis4cats to use Cats 2.9 at the latest: https://github.com/profunktor/redis4cats/tree/downgraded-to-cats-29 and when I use that as a local snapshot, your repro no longer crashes. Without this change, the build contains multiple versions of Cats:
However,
I think sbt is still publishing against 2.9, but it's compiling and testing against 2.12, thus using the a method only present on 2.10 and above. Might be some optimization on sbt's side hitting an unhappy path... Here's the difference in bytecode: LHS is The latter refers to the method in question, the former doesn't. ![]() BTW there is a mention of this syntax method in the release notes for 2.10.0:
All in all, I think redis4cats should add an explicit dependency on Cats Core to its core & effects modules, but the behavior of (probably sbt) compiling against a different version than what's published is still suspicious to me and probably should be investigated further. |
Beta Was this translation helpful? Give feedback.
-
Nicely done @kubukoz |
Beta Was this translation helpful? Give feedback.
-
@armanbilge hey Arman, you asked the place to dig into the issue. Here it is. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Saying this straight off the bat, this is not a Redis4Cats issue! However, IMHO, some awareness (read better visibility) for the issue I encountered should be raised.
TL;DR, if a project lacks the explicit dependency on Cats-Core but has both Cats-Effect (v3.5.7) and Redis4Cats (v1.7.2) — an
NSME
will be thrown:That's unpleasant but until Cats-Effect is not on the current version of Cats-Core, the only possible solution is to have Cats-Core defined explicitly among the dependencies in a project. Again, there is nothing to be done on the Redis4Cats side.
See the complete minimal representation here https://github.com/danicheg/redis4cats-nsme-showcase.
Resolution
Ultimately, as @kubukoz explored and confirmed, this was a redis4cats omission. It was addressed in #956.
Beta Was this translation helpful? Give feedback.
All reactions