-
Notifications
You must be signed in to change notification settings - Fork 19
Is "use" statement functional? #55
Copy link
Copy link
Open
Labels
Description
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.
Reactions are currently unavailable