With #44 scalegen was extended to limit the maximum depth of nested types when encoding and decoding types.
Scalegen should also by default not generate code for types that contain cyclic dependencies on each other, e.g.:
type Message struct {
Sigs []Signatures
}
type Signature struct {
Message Message
}
This leads to messages that are arbitrarily large and is usually bad design.
Possibly a configurable parameter can be added that would allow the generation of encode & decode methods for types with cyclic dependencies but this should require the user to explicitly allow it and still print a warning during code generation.
With #44 scalegen was extended to limit the maximum depth of nested types when encoding and decoding types.
Scalegen should also by default not generate code for types that contain cyclic dependencies on each other, e.g.:
This leads to messages that are arbitrarily large and is usually bad design.
Possibly a configurable parameter can be added that would allow the generation of encode & decode methods for types with cyclic dependencies but this should require the user to explicitly allow it and still print a warning during code generation.