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
This should get caught on this error, something like this:
$ dagger -m github.com/jedevc/dagger-iface-issue/bar functions
Error: input: module.withSource.initialize resolve: failed to initialize module: failed to add object to module "bar": failed to validate type def: object "Bar" field "Custom" cannot reference external type from dependency module "foo"
Note the use of WithObject - this should instead be WithInterface. Because of this, we can't find FooCustomIface as a valid object, and so we attempt to namespace it twice, hence the bizarre error.
Not quite sure what the right answer is here:
We could have objects degrade to interfaces at this point in the schema - since from a graphql perspective, they're just classes.
We could have some better logic in the Go SDK to detect that the dagger interface (expressed as a golang struct) is actually an interface (but not immediately sure of a neat way to do this).
The text was updated successfully, but these errors were encountered:
See https://github.com/jedevc/dagger-iface-issue. The issue is that the
bar
module cannot re-exportFooCustomIface
.This should get caught on this error, something like this:
However, instead we get an insane error:
This is because our go codegen is actually wrong, and we construct the wrong typedef:
Note the use of
WithObject
- this should instead beWithInterface
. Because of this, we can't findFooCustomIface
as a valid object, and so we attempt to namespace it twice, hence the bizarre error.Not quite sure what the right answer is here:
The text was updated successfully, but these errors were encountered: