Repository navigation
Add shorthand for published in datamodel fields and calls - #7322
Merged
Merged
Conversation
last-genius
approved these changes
Oct 9, 2026
Most fields and messages are published in a single release with a lifecycle description identical to their own description, which forces every stanza to spell the same text twice: ~lifecycle:[(Published, rel_rio, "Some text")] ... "Some text" Accept ~published:rel as a shorthand that builds [(Published, rel, desc)] (or doc, for messages). Passing both ~lifecycle and ~published is an error, as is passing neither. Signed-off-by: Christian Pardillo Laursen <christian.pardillolaursen@citrix.com>
This commit removes duplication in every datamodel field/call whose lifecycle is a single [(Published, rel, text)] entry with text equal to the field description or the message's explicit ~doc. The resulting Datamodel.all_api value is byte-identical to the one before this change (compared via Marshal), and so is the gen_json output. Signed-off-by: Christian Pardillo Laursen <christian.pardillolaursen@citrix.com>
cplaursen
force-pushed
the
private/cpardill/datamodel-published-shorthand
branch
from
October 9, 2026 14:26
a998a56 to
89d0b36
Compare
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.
This PR removes duplication from the datamodel fields and calls by adding a shorthand for when fields were published, which applies whenever the lifecycle description is identical to the field description and the field lifecycle is only published.
The changes are pure refactors, with no behaviour change. This was verified by checking that the generated datamodel definitions are identical before and after the changes.