-
Notifications
You must be signed in to change notification settings - Fork 25
Compilation fail using a case class with no parameters #124
Comments
Interesting one, I'm not sure how well we can solve this case. I'll have a look at it. |
I don't know if that's a satisfactory answer for you but I think that if you have a service having no parameters you can consider it like a "static" piece of configuration and put it in your
Then it all compiles. Does that work for you? |
Thanks for the workaround. We decided to downgrade Grafter to version 2.6.0 as a temporary solution since we don't have any nested configuration classes that need to be supported by the last version of |
It is indeed silly to have to repeat in a |
Thanks @etorreborre for the quick response. I have tried your last changes in my project and I'm still getting the same error. I have made a test with a simplified graph (since I have more than 50 components in the real scenario) which is not compiling using grafter#master
And the error is:
,which I think is related with the error in this issue. I've tried to change the number of parameters in ApplicationConfiguration case class and this time it seems to have no effect on the results. |
Unfortunately I don't see what trick to apply here. I'll try to have another look during the week-end. |
I am sorry I could not find a way to make this work, you might have to either introduce a dummy parameter for your service or put an instance in the |
I'm getting an ambiguous implicit values compilation error when using the
@reader
annotation in a case class without parameters in combination with the@readers
annotation over a case class with more than one parameter.I've got this error reproduced by modifying the test ReadersNestedMacroTest, included in the last release, with the following changes:
@reader
represented by a case class with no parameters@readers
annotation:Step (2.) is important since adding a new parameter to this case class seems to reproduce the error while leaving it with only one parameter results in a successful compilation.
The full test code causing the compilation error would be:
And the compilation error trace when executing
sbt clean test
is:The text was updated successfully, but these errors were encountered: