You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure whether it is a bug, but for sure it's quite a surprising behavior.
There is an option in the configuration called Configuration.default.withDefaults which allows for the derivation of non-case classes based on the fields they specify.
When combined with the following scalac options:-Xlint:strict-unsealed-patmat and -Wconf:cat=other-match-analysis:error it causes compilation to fail with "match may not be exhaustive" error.
This alone isn't yet that bad, but the error will propagate downstream through the chain of defined derivations and macros making it quite hard to debug for the end-users. I myself got it when I was trying to derive some tapir's type-classes that rely on circe codecs.
Hi,
I am not sure whether it is a bug, but for sure it's quite a surprising behavior.
There is an option in the configuration called
Configuration.default.withDefaults
which allows for the derivation of non-case classes based on the fields they specify.When combined with the following scalac options:
-Xlint:strict-unsealed-patmat
and-Wconf:cat=other-match-analysis:error
it causes compilation to fail with "match may not be exhaustive" error.This alone isn't yet that bad, but the error will propagate downstream through the chain of defined derivations and macros making it quite hard to debug for the end-users. I myself got it when I was trying to derive some tapir's type-classes that rely on circe codecs.
Here is a failed build on CI which illustrates that problem: https://github.com/softwaremill/livestub/runs/2586343239
Update: When trying to prepare a minimal example to reproduce I discovered that such a class needs also to specify an
unapply
method.The minimal example to reproduce:
Originally reported in circe/circe#1756
The text was updated successfully, but these errors were encountered: