openconfig / ygot

A YANG-centric Go toolkit - Go/Protobuf Code Generation; Validation; Marshaling/Unmarshaling
Apache License 2.0
286 stars 107 forks source link

Unable to work with global enums #228

Closed shravyarani closed 4 years ago

shravyarani commented 6 years ago

Hi All,

I have created a basic_types.yang file with typedef enum in it and I am using it in multiple files. The protos generated using ygot. However, when I compile code it throws errors saying enum package is not defined.

com/test/core/datamodel/protos/common/common.proto:121:3: "com.test.core.datamodel.protos.common.enums.SwitchState" is not defined.

local enums doesn't have this issue.

robshakir commented 5 years ago

Hi,

Can you provide the arguments that you're using to generate the protos, and protoc please?

Thanks, r.

wenovus commented 4 years ago

I think this may be due to #394

wenovus commented 4 years ago

Optimistically closing.