Repository navigation
Emit record ids and doc comments in generated types - #3
Merged
Merged
Conversation
Struct skirType() output now always passes recordId to Type::struct() (including empty structs) and passes doc for documented records and fields, using the metadata helpers from @php-skir/generator-core. Enum and method descriptor metadata comes from the core renderers. Requires a @php-skir/generator-core release that exports renderDocArgument and renderRecordMetadataArguments, and a php-skir/runtime that accepts the recordId and doc arguments. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Generated types carry their record id and doc comments, which needs php-skir/runtime 0.2.1 or later. Co-Authored-By: Claude Fable 5.2 <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.
Why
php-skir/runtime0.2.1 lets a type carry the schema's record id and doc comments, andphp-skir/server0.3.1 shows them in the RPC Studio. Until the generated code provides them, the Studio has to invent record names.What changes
skirType()emitsrecordId: '<module path>:<qualified name>'and, where the schema has a doc comment,doc:on the record and on its fields. An empty struct gets its record id too.@php-skir/generator-core0.3.0, which this now depends on.Breaking
Generated PHP uses named arguments that exist from
php-skir/runtime0.2.1, so projects must update the runtime when they regenerate. The README install line says so.Version is bumped to 0.3.0.