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 attempting to 'use' the types from one RDL file in another one. An example of what I'm doing follows:
File: .../example/used/used.rdl
name used
type AStruct struct {
int64 AValue
}
File: .../example/user/user.rdl
name user
use "../used/used.rdl"
resource used.AStruct GET "/example" {
expected OK;
exceptions {
ResourceError NOT_FOUND; // No entry found
}
}
When I attempt to generate any Go code for the user.rdl file I receive a warning and the Go code generated does not build. When I attempt to generate Markdown I get an error from the rdl tool. Issuing an rdl parse command on the user.rdl file returns no errors. Am I doing something wrong or is this a bug? If I replace the use keyword in the user.rdl file with the include keyword and remove the used. prefix from AStruct, generation succeeds in all cases. However a completely new type is then generated in the user package that is no longer the same as used.AStruct.
The text was updated successfully, but these errors were encountered:
This must be broken. The "use" directive was originally intended for the special references to RDL types themselves, tests and fixes are needed for the use case you describe.
I'm attempting to 'use' the types from one RDL file in another one. An example of what I'm doing follows:
File: .../example/used/used.rdl
File: .../example/user/user.rdl
When I attempt to generate any Go code for the user.rdl file I receive a warning and the Go code generated does not build. When I attempt to generate Markdown I get an error from the rdl tool. Issuing an rdl parse command on the user.rdl file returns no errors. Am I doing something wrong or is this a bug? If I replace the use keyword in the user.rdl file with the include keyword and remove the used. prefix from AStruct, generation succeeds in all cases. However a completely new type is then generated in the user package that is no longer the same as used.AStruct.
The text was updated successfully, but these errors were encountered: