avro icon indicating copy to clipboard operation
avro copied to clipboard

undefined: avrotypegen

Open gubtos opened this issue 5 months ago • 2 comments

Given the following avro

{
    "type": "record",
    "name": "ItemEvent",
    "namespace": "search.item",
    "fields": [
        {
            "name": "id",
            "type": {
                "type": "string",
                "logicalType": "UUID"
            }
        },
        {
            "name": "modes",
            "type": {
                "type": "array",
                "items": {
                    "type": "enum",
                    "name": "mode",
                    "symbols": [
                        "SINGULAR"
                    ]
                }
            }
        }
    ]
}

And run a command like

avrogo -p is item-search.avsc 

The generated code dont imports the avrotypegen module, but uses it in the code. Given the following error:

undefined: avrotypegen compiler[UndeclaredName](https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#UndeclaredName)

gubtos avatar Jan 08 '24 19:01 gubtos