knownDirectSubclasses of <class> observed before subclass <class> registered
See original GitHub issueIn: 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:
[error] knownDirectSubclasses of RunStatus observed before subclass Running registered
[error] knownDirectSubclasses of RunStatus observed before subclass Success registered
[error] two errors found
[error] (orchestraJVM/compile:compileIncremental) Compilation failed
Related: https://github.com/lloydmeta/enumeratum/issues/90 https://issues.scala-lang.org/browse/SI-7046 https://github.com/scala/scala/pull/5284
Using: Scala 2.12.2 Circe 0.8.0
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
How to avoid knownDirectSubclasses errors in Scala 2.12. ...
[error] knownDirectSubclasses of FileCommand observed before subclass ExecFile registered [error] one error found [error] ...
Read more >Scala reflection: knownDirectSubclasses only works for ...
The JVM dynamically loads classes using a classloader (duh). It might have different loading rules for seemingly unrelated classes that just extend something ......
Read more >typelevel/scala
I want to make a TLS 2.12.1 release before the break and I'd really like to get it in if possible.
Read more >Warnings and known issues - circe
knownDirectSubclasses of <class > observed before subclass <class> registered. This is a known issue (#434, #659) that stems from the way fully automatic ......
Read more >Use Scala Macros and Quasiquotes to Reduce Boilerplate
I found that the event processor implementation stored the handlers in a map with the registered class as the key. When an event...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lloydmeta @joan38 putting the extending
classes
andobjects
inside the companion object of thesealed trait
will causeknownDirectSubclasses
(sometimes can be intermittently due to incremental compiling).right after upgrading to
2.12.0
(which contains this https://github.com/scala/scala/pull/5284 ), we’ve seen a lot more cases ofknownDirectSubclasses
in incremental compile. Move the direct subclasses outside of the sealed trait companion object definitely help in our case. But #434 looks scary! 😦