Repository navigation
XCPNG-3989: Commit message list upstream (backport) - #7381
Open
contificate wants to merge 6 commits into
Open
contificate wants to merge 6 commits into
contificate wants to merge 6 commits into
Conversation
last-genius
approved these changes
Nov 6, 2026
Contributor
|
Could you cherry-pick with |
Each released message can be emitted with api_compat.exe. The format is line-delimited JSON (often saved as .ndjson). You can `dune exec ./ocaml/idl/api_compat.exe -- -print` to see the messages printed to stdout. The intention is that we'll emit this to a file, committed upstream, and then add a test that compares the contents for mutations. Signed-off-by: Colin James <contificate@gmail.com> (cherry picked from commit 203f040)
Adds a simple parser for the line-delimited JSON format introduced previously. Signed-off-by: Colin James <contificate@gmail.com> (cherry picked from commit cc76ce9)
Commits the current messages file to the repository. This was done via redirecting `dune exec ./ocaml/idl/api_compat.exe -- -print` to ocaml/idl/messages.ndjson. Signed-off-by: Colin James <contificate@gmail.com> (cherry picked from commit c14ec72)
You can now invoke api_compat.exe with `-check <file>` and it will compare the datamodel against this file. We perform a pairwise comparison of message parameters to catch various potential mutations that may have occurred when modifying the datamodel. E.g. changing a parameter's default value, a message's return type, permuting the order of parameters, adding a parameter (at the end) that lacks a default, etc. The next step is to turn this into a workflow compatible with dune. Signed-off-by: Colin James <contificate@gmail.com> (cherry picked from commit 1f5c301)
Generates a messages.ndjson.generated in the dune build directory, which can then be compared against what's currently there (for promotion purposes), along with turning api_compat's -check mode into a test. We also add a promotion rule alias. Signed-off-by: Colin James <contificate@gmail.com> (cherry picked from commit 2ad61c7)
Similar to datamodel_lifecycle.ml, we check the generated messages list against the one currently committed in the repository. If the check fails, we abandon. Otherwise, we automatically do promotion (applying the diff to the worktree). Signed-off-by: Colin James <contificate@gmail.com> (cherry picked from commit bf4f95e)
contificate
force-pushed
the
cbarr/26.1/messages
branch
from
November 6, 2026 14:17
0217e0e to
a7f83dc
Compare
This branch has not been deployed
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.
Backport of #7361 to 26.1-lcm.