Repository navigation
Emit record ids and doc comments in runtime types - #2
Merged
Merged
Conversation
…escriptors Normalized records now carry a recordId (`<module path>:<qualified name>`, matching upstream Skir type signatures) and records, fields, variants and methods carry their doc comment text. Enum skirType() output always passes recordId and passes doc when present; MethodDescriptor output passes doc when present. Blank docs are treated as absent. Export phpSingleQuotedLiteral, renderDocArgument and renderRecordMetadataArguments so target adapters render the same arguments for structs. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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/runtimetypes can now carry the schema's record id and doc comments, so that the server's RPC Studio can show real names and documentation. The generators have to emit them.What changes
NormalizedRecord.recordId(<module path>:<qualified name>, as in upstream type descriptors) and optionaldocon records, fields, enum constants and methods. Doc text is the compiler's plaindoc.text; whitespace-only docs are dropped.skirType()andMethodDescriptorrendering emitrecordId:anddoc:as named arguments.doc:is left out when there is no doc comment.phpSingleQuotedLiteral,renderDocArgument,renderRecordMetadataArgumentsand theSkirDoctype.Breaking
NormalizedRecord.recordIdis required, which breaks callers that hand-build a normalized schema.php-skir/runtime0.2.1 or later, because of the named arguments.Version is bumped to 0.3.0.