-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate gnostic to use gnostic-models #400
Conversation
In order to avoid a panic at runtime in a downstream project that pulls in gnostic and gnostic-models, create a new `<proto>.pbalias.go` file which uses type aliases and variables to point to the equivalent protobuf types in gnostic-models. This will prevent any API breakage for code using the previous types from gnostic, and allow for this logic to be maintained in one place going forward.
protoc -I . -I ./third_party --go_out=. --go_opt=paths=source_relative surface/*.proto | ||
protoc -I . -I ./third_party --go_out=. --go_opt=paths=source_relative metrics/*.proto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the directories which have proto definitions in gnostic-models, and noticed metrics
was compiling twice.
@pkwarren is there an update needed now that google/gnostic-models#5 is merged? |
Yes - thanks for merging the dependency. I was out today but will aim to get this ready tomorrow. |
@timburks - This should be ready for re-review now. Let me know if you have any questions. |
Thanks @pkwarren LGTM - I'm not sure of all the downstream implications but I'm game to try this (and clients should be using tagged versions). Merging. |
In order to avoid a panic at runtime in a downstream project that pulls in gnostic and gnostic-models, create a new
<proto>.pbalias.go
file which uses type aliases and variables to point to the equivalent protobuf types in gnostic-models. This will prevent any API breakage for code using the previous types from gnostic, and allow for this logic to be maintained in one place going forward.Fixes #397.