-
Notifications
You must be signed in to change notification settings - Fork 15
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
Internal error registry per package #636
Conversation
Generate changelog in
|
go.mod
Outdated
github.com/julienschmidt/httprouter v1.3.0 | ||
github.com/nmiyake/pkg/dirs v1.1.0 | ||
github.com/palantir/conjure-go-runtime/v2 v2.86.0 | ||
github.com/palantir/conjure-go-runtime/v2 v2.86.1-0.20241126014203-f52ba8f67d54 |
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.
Do not merge; requires palantir/conjure-go-runtime#724
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.
Couple notes but otherwise this looks good to me:
- Not being able to deserialize errors not defined by a Clients conjure definition seems more than reasonable, and in fact maybe more correct.
- It is common for projects to generate all conjure into a shared output directory, but this would be a good reason to push projects into namespacing their conjure dependencies, which I have found to be a better UX anyways. Besides this behavior would be the same as what currently exists and would not require a migration for users to pick this up.
Released v6.63.0 |
Replace global conjure-type error registration with a generated registry per conjure definition.
Creates a new
internal/conjureerrors
package in each output directory for conjure definitions that include errors. Generated client implementations provide the definition-specific registry as a ConjureErrorDecoder to be used when deserializing a non-2xx JSON response.Clients will no longer be able to deserialize errors not defined in their own conjure definition.
Generating multiple IRs into the same output directory will result in all definitions sharing the same error registry.
Requires palantir/conjure-go-runtime#724
Addresses #415
This change is