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'm talking about the generated scala code, and I've never looked at the code generators for other languages, but I assume that those might have similar behavior.)
Issue description
When you give a field in a courier record a default value, it generates an apply method with default arguments for that field. This can hide bugs where you construct the record without giving it all the data that it needs. Therefore, I suggest that the generated methods not have default arguments.
Obviously, this will probably break a lot of existing code that uses courier. Maybe there should be some sort of "generateDefaultArgument" annotation to ease the transition.
Example
Here is an example of a bug that the current behavior hid from me:
I added the preCreatedNodes field after I wrote the SpecificationWithIds.toTuple "deconstructor", and I forgot that I needed to update the "deconstructor".
The text was updated successfully, but these errors were encountered:
(I'm talking about the generated scala code, and I've never looked at the code generators for other languages, but I assume that those might have similar behavior.)
Issue description
When you give a field in a courier record a default value, it generates an apply method with default arguments for that field. This can hide bugs where you construct the record without giving it all the data that it needs. Therefore, I suggest that the generated methods not have default arguments.
Obviously, this will probably break a lot of existing code that uses courier. Maybe there should be some sort of "
generateDefaultArgument
" annotation to ease the transition.Example
Here is an example of a bug that the current behavior hid from me:
I added the
preCreatedNodes
field after I wrote theSpecificationWithIds.toTuple
"deconstructor", and I forgot that I needed to update the "deconstructor".The text was updated successfully, but these errors were encountered: