Skip to content

CDDL improvements #4996

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

CDDL improvements #4996

wants to merge 1 commit into from

Conversation

Soupstraw
Copy link
Contributor

@Soupstraw Soupstraw commented Apr 16, 2025

Description

This PR uses a newer version of cuddle, which makes it possible to manually specify the order in which Huddle definitions appear. Also some of the comments about fields are now attached to the fields themselves, instead of being printed out in a long comment in front of the definition.

The pretty printer has also been improved a bit, but there are still many places where the formatting is a bit off. The pretty printer could still be improved a lot, but at least the current version is a bit closer to what I'd like it to be once it's finished.

Checklist

  • Commits in meaningful sequence and with useful messages.
  • Tests added or updated when needed.
  • CHANGELOG.md files updated for packages with externally visible changes.
    NOTE: New section is never added with the code changes. (See RELEASING.md).
  • Versions updated in .cabal and CHANGELOG.md files when necessary, according to the
    versioning process.
  • Version bounds in .cabal files updated when necessary.
    NOTE: If bounds change in a cabal file, that package itself must have a version increase. (See RELEASING.md).
  • Code formatted (use scripts/fourmolize.sh).
  • Cabal files formatted (use scripts/cabal-format.sh).
  • hie.yaml updated (use scripts/gen-hie.sh).
  • Self-reviewed the diff.

@Soupstraw Soupstraw force-pushed the jj/cddl-ordering branch 14 times, most recently from daf12fe to f070721 Compare April 22, 2025 11:08
@Soupstraw Soupstraw marked this pull request as ready for review April 22, 2025 11:16
@Soupstraw Soupstraw requested a review from a team as a code owner April 22, 2025 11:16
@Soupstraw Soupstraw force-pushed the jj/cddl-ordering branch 6 times, most recently from 75adbcb to 10739f9 Compare April 22, 2025 15:27
Copy link
Contributor

@teodanciu teodanciu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a first pass on this - not easy to review, particularly the final cddl files!
Will take another look tomorrow

@@ -18,6 +18,12 @@ source-repository-package
-- MAKE SURE THIS POINTS TO A COMMIT IN `*-artifacts` BEFORE MERGE!
tag: cccfde6934ab0988fee3885ee160fffe04aa8274

source-repository-package
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we release this first? I worry adding this SRP like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit conflicted about this at the moment. The changes that I made to cuddle work fine for our use case, but it seems to be worse in some other aspects. I'd like to make it more stable before I release it, because consensus also wants to use cuddle for testing.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't merge this PR with SRP on cuddle, since it would yield ledger packages unreleasable.

@Soupstraw Soupstraw force-pushed the jj/cddl-ordering branch 3 times, most recently from 5aee68a to 2eccb20 Compare April 25, 2025 14:37
Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Love the new formatting, comment placing and ability to specify the order of definitions.

Nice work @Soupstraw

@@ -18,6 +18,12 @@ source-repository-package
-- MAKE SURE THIS POINTS TO A COMMIT IN `*-artifacts` BEFORE MERGE!
tag: cccfde6934ab0988fee3885ee160fffe04aa8274

source-repository-package
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't merge this PR with SRP on cuddle, since it would yield ledger packages unreleasable.

@Soupstraw Soupstraw force-pushed the jj/cddl-ordering branch from 2eccb20 to bfe77e1 Compare May 2, 2025 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants