Open vikrem opened 2 years ago
Hi @vikrem,
Yes, that's kind of by design of conferer v1, there is an all encompassing instance FromConfig a
so that means that if you try to get an instance from something that doesn't have a FromConfig instance it will pick the default one (which always fails no matter what)
I'm preparing a v2 release which will fix this, and trying to use fetchFromConfig with something that doesn't have a FromConfig instance will not compile.
It's still not ready though since I've been busy and the prototypes that I've build still don't sit right.
As soon as v2 is out I'll close this issue
It looks like #87 removes that all encompassing instance. Is that to be cut into v2 and won't be in v1 then?
oh haha, I forgot I had that merged.
That's right, v2 will be quite a change, so I think it will need manual intervention from users so I probably won't backport it
With the following program on GHC 8.10.7, conferer 1.1.0.0:
This compiles and runs, without deriving
Generic
orFromConfig
. The application crashes with an exception:Setting a
secret
key inconfig.properties
doesn't help and the application continues to crash in the same manner. Deliberately adding a blank instance ofFromConfig
, and derivingGeneric
fixes the problem, but there is no indication to do so.