Repository navigation
fix(panko): support Panko 1.0 - #139
Merged
Merged
Conversation
Panko 1.0 replaced its C extension with a code-gen engine, and serializer instances no longer have the @descriptor the plugin read, so generation failed with "undefined method 'attributes' for nil". Read the public Panko::Descriptor instead when it exists, and keep the old path for Panko < 1.0. Associations keep the has_many-before-has_one order of Panko < 1.0 so generated types don't reorder on upgrade. CI gets a Ruby 4.0 job on Panko 1.0, which needs Rails >= 7.2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Panko 1.0 replaced its C extension with a code-gen engine. Serializer instances no longer have the
@descriptorthe plugin read, so generating types fails:Panko 1.0 adds a public, read-only
Panko::Descriptorfor introspection. The plugin now reads that when it exists, and keeps the old path for Panko < 1.0.has_many-before-has_oneorder of Panko < 1.0, so existing generated types and OpenAPI schemas don't reorder on upgrade. Panko 1.0 lists them in declaration order.Panko 1.0 needs Ruby >= 3.4 and Rails >= 7.2, and the test app pins Rails 7.1. So
GemfilereadsPANKO_VERSIONandRAILS_VERSIONfrom the environment, and CI gets an extra Ruby 4.0 job on Panko 1.0 and Rails 7.2. The other jobs still resolve Panko 0.8.5.The full suite passes on Panko 0.8.5 (Rails 7.1) and Panko 1.0.0 (Rails 7.2) with no snapshot changes.
🤖 Generated with Claude Code