Skip to content

Go: resource failed to be generated for implements feature #1642

Description

@jamesstocktonj1

Description

For the given wit with 2 keyvalue stores:

world handler {
  import primary: wasi:keyvalue/store@0.2.0-draft;
  import secondary: wasi:keyvalue/store@0.2.0-draft;
}

Build fails due to the Bucket and Error types not being generated:

$ componentize-go \
          --wit-path ./wit \
          --world handler \
          --world sdk \
          build
Error: 'go build' command failed: # implements-test/gen/secondary
gen/secondary/wit_bindings.go:19:13: undefined: Bucket
gen/secondary/wit_bindings.go:19:79: undefined: Error
gen/secondary/wit_bindings.go:76:13: undefined: Bucket
gen/secondary/wit_bindings.go:76:83: undefined: Error
gen/secondary/wit_bindings.go:123:13: undefined: Bucket
gen/secondary/wit_bindings.go:123:71: undefined: Error
gen/secondary/wit_bindings.go:168:13: undefined: Bucket
gen/secondary/wit_bindings.go:168:62: undefined: Error
gen/secondary/wit_bindings.go:213:13: undefined: Bucket
gen/secondary/wit_bindings.go:213:78: undefined: KeyResponse
gen/secondary/wit_bindings.go:213:78: too many errors

These types are generated in the primary interface gen/primary/wit_bindings.go but not in the secondary:

Image

Source code to reproduce can be found below:

https://github.com/jamesstocktonj1/implements-test

Metadata

Metadata

Assignees

No one assigned

    Labels

    gen-goRelated to the Go code generator

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions