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
Currently DowelGenerator is not considering if the class annotated with @ConsiderForDowel has a no-args constructor or not. It just assumes such a constructor exists and generates code which tries to invoke a (non-existent) no-args constructor. See here.
DowelGenerator should handle such cases gracefully and log meaningful errors.
TODO
Remove strict reliance on the primary constructor of the class annotated with @ConsiderForDowel annotation for object creation. Read more here.
Log error for absence of non-private constructors separately.
Log error for absence of no-args constructors separately.
Update processor tests for the changes
Update lint rules to handle these cases
Update lint ruletests for the changes
The text was updated successfully, but these errors were encountered:
Also, Dowel only considers the primary constructor of the classes annotated with @ConsiderForDowel annotation. This limitation is not really necessary. All Dowel cares about is being able to create an instance by calling the invoke method (i.e., () ex Provider()) without passing any parameters. It does not really matter if the corresponding constructor is primary or not, or wether it has default values or not.
So in light of this issue, it would also make sense to lift of this unnecessary limitation
Currently
DowelGenerator
is not considering if the class annotated with@ConsiderForDowel
has a no-args constructor or not. It just assumes such a constructor exists and generates code which tries to invoke a (non-existent) no-args constructor. See here.DowelGenerator
should handle such cases gracefully and log meaningful errors.TODO
primary constructor
of the class annotated with@ConsiderForDowel
annotation for object creation. Read more here.tests
for the changeslint rules
to handle these caseslint rule
tests
for the changesThe text was updated successfully, but these errors were encountered: