The @schema annotation should also add an implicit definition with shapeless.cachedImplicit (or equivalent) to the companion object (thus optimizing compile time for the uses of the Reified instance).
Problems:
[x] If the companion object already contains implicit definition(s), they could conflict with the added one. [Solution: this should be detected, and in these cases, the automatic one shouldn't be added.]
[x] We can't detect already existing conflicting implicits (because it seems that we cannot typecheck in an annotation macro). [Solution: add the implicit unconditionally and document it.]
[x] The implicit defined in the companion object will conflict with the ones in the Reified companion object. [Solution: fb5b1131c34c18ffcb157e6949793bf780b6d0df]
Tasks:
[x] Add implicit definition to the macro.
[x] Check if we still need the forwarder. [57aae75]
The
@schema
annotation should also add an implicit definition withshapeless.cachedImplicit
(or equivalent) to the companion object (thus optimizing compile time for the uses of theReified
instance).Problems:
Reified
companion object. [Solution: fb5b1131c34c18ffcb157e6949793bf780b6d0df]Tasks: