-
-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meta("struct:pkg:path", "foo/bar") doesn't work. #3361
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Poke |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Poke |
There are two issues:
The second issue is unclear whether it is a specification or a bug. The Meta DSL's godoc says:
This specification can be reproduced by changing design as follows. -Field(1, "resources", ArrayOf(Resource))
+Field(1, "resources", Resource)
Should Goa print the same error for Array types? |
Thank you for looking into this! This limitation was to help keep the implementation simple. The main use case for For example making it possible to define multiple packages for types that are related would mean having to write code that detect circular dependencies. In general the code that deals with external packages is already pretty complex so my vote would be to make sure that the That being said if there is a strong case for making it possible to create multiple packages with types that have fields defined across the packages and if we can find an easy way to support it then that's great. |
That's nice, but it will take some time to design, so I'll add an error message for now. |
Great, thank you for the PR! |
Closing this issue, the TL;DR is that there was a bug and a missing validation. The decision is to not allow defining complex package types so as to keep the code simple. |
When using
Meta("struct:pkg:path", "foo/bar")
, code produced doesn't compile.Example code:
Produces code like:
and
The text was updated successfully, but these errors were encountered: