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
If I use the same ResultType in more than one Method -> Result sing different Views , the goa gen command generates a views/view.go declaring the type twice.
Naturally, if I try to build the project, the command fails:
# calc/gen/objects/views
gen\objects\views\view.go:25:6: ObjectMedia redeclared in this block
previous declaration at gen\objects\views\view.go:17:6
gen\objects\views\view.go:91:6: ValidateObjectMedia redeclared in this block
previous declaration at gen\objects\views\view.go:77:52
I have observed this for version 3.2.5, I was previously using version 3.2.0 and this issue was not present back then.
This might be related to this other reported bug, maybe they are both caused by the same issue: #2681
If I use the same
ResultType
in more than oneMethod
->Result
sing differentView
s , thegoa gen
command generates aviews/view.go
declaring the type twice.Naturally, if I try to build the project, the command fails:
I have observed this for version
3.2.5
, I was previously using version3.2.0
and this issue was not present back then.This might be related to this other reported bug, maybe they are both caused by the same issue:
#2681
Here I have reproduced the bug in a simple project:
https://github.com/rozagerardo/samples/tree/go/goa/bugs/redeclared-types
Here I'm using the
ResultType
in two differentMethod
s:https://github.com/rozagerardo/samples/blob/go/goa/bugs/redeclared-types/calc/design/design.go#L117
And this is the generated
view.go
file, declaring the type twice:https://github.com/rozagerardo/samples/blob/go/goa/bugs/redeclared-types/calc/gen/objects/views/view.go#L16
The text was updated successfully, but these errors were encountered: