-
Notifications
You must be signed in to change notification settings - Fork 538
-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
knownDirectSubclasses of <class> observed before subclass <class> registered #639
Comments
I've been wondering about this one for a while as well and finally got around to successfully reproducing it. I had a bit of trouble reproducing it because it is highly dependent on the order in which things get compiled. Here's my attempt at a minimal repro: https://github.com/lloydmeta/circe-auto-derive-repro |
@lloydmeta @joan38 putting the extending |
@ngbinh from what I can see, it definitely depends on whether or not that trait/object get compiled before I mentioned this in the readme of my repo, but I'll paste it here as well
|
@lloydmeta yeah, you need to at least try to I also think this problem only exists in scala 2.12 as we were fine in 2.11. |
BTW, this Scastie snippet is decidedly oddly written, but shows that you can reproduce the same error without putting the ADT members inside the companion object. |
For what it's worth this is probably the same root issue as #434. I don't think there's a lot we can do here, but fortunately things on the What I'd personally like to see is a detailed section in the docs about the places this will come up, and potential workarounds. I'm not sure when I'll get around to writing it myself, though. |
@travisbrown yea, it definitely seems to be related. As @witi83 noted in the lloydmeta/enumeratum#90, this seems to have started after 2.11.8 (EDIT for poor wording: as in, it works with 2.11.8, breaks in 2.11.x releases after that). I've verified this to be the case and added a note to my repro repo as well.. I'll be glad to help add something to the docs about this, just as soon as I actually understand what is going on. I think a lot of ppl thought this problem was already fixed. EDIT: filed a bug report (scala/bug#10330) to find out more about the regression-looking side of things. |
right after upgrading to |
We've now got docs at least for this issue, via #644. |
- knownDirectSubclasses of <class> observed before subclass <class> registered - circe/circe#639 - http4s compilation errors - enabling partialUnification - fromResource is not a member of Source class - https://stackoverflow.com/questions/27360977/how-to-read-files-from-resources-folder-in-scala
- knownDirectSubclasses of <class> observed before subclass <class> registered - circe/circe#639 - http4s compilation errors - enabling partialUnification - fromResource is not a member of Source class - https://stackoverflow.com/questions/27360977/how-to-read-files-from-resources-folder-in-scala
- knownDirectSubclasses of <class> observed before subclass <class> registered - circe/circe#639 - http4s compilation errors - enabling partialUnification - fromResource is not a member of Source class - https://stackoverflow.com/questions/27360977/how-to-read-files-from-resources-folder-in-scala
- knownDirectSubclasses of <class> observed before subclass <class> registered - circe/circe#639 - http4s compilation errors - enabling partialUnification - fromResource is not a member of Source class - https://stackoverflow.com/questions/27360977/how-to-read-files-from-resources-folder-in-scala
In:
https://github.com/joan38/orchestra/tree/6d2c170f37040f2179479c6126292e030808ed08
Just rename:
orchestra/src/main/scala/com/goyeau/orchestra/ARunStatus.scala
to:
orchestra/src/main/scala/com/goyeau/orchestra/RunStatus.scala
And enjoy:
Related:
lloydmeta/enumeratum#90
https://issues.scala-lang.org/browse/SI-7046
scala/scala#5284
Using:
Scala 2.12.2
Circe 0.8.0
The text was updated successfully, but these errors were encountered: