Skip to content

Conversation

@turbolent
Copy link
Collaborator

Noticed this while reviewing onflow/cadence#2364

  • Restriction types may have no restrictions
  • Composite values may have no fields
  • Composite types may have no fields

There might be more cases that need to be fixed.

Copy link
Owner

@fxamacker fxamacker left a comment

Choose a reason for hiding this comment

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

Thanks!

@fxamacker fxamacker merged commit 92f07c8 into main Mar 14, 2023
fxamacker added a commit that referenced this pull request Mar 14, 2023
Changed composite-type.fields from + to *.
Changed restricted-type-value.restrictions from + to *.

Basically, this changes "one or more" to "zero or more"
in order to be consistent with what was done in:
#66
fxamacker added a commit to onflow/cadence that referenced this pull request Mar 14, 2023
Updated Go comments containing CCF specs in CDDL notation. Specifically,
changed CDDL notation representing "one or more" to "zero or more" for:
- composite-value.fields
- composite-type.fields
- composite-type-value.fields

See CCF specification PRs:
- fxamacker/ccf_draft#66
- fxamacker/ccf_draft#67
fxamacker added a commit to onflow/cadence that referenced this pull request Mar 14, 2023
Updated Go comments containing CCF specs in CDDL notation. Specifically,
changed CDDL notation representing "one or more" to "zero or more" for:
- restricted-type.restrictions
- restricted-type-value.restrictions

See CCF specification PRs:
- fxamacker/ccf_draft#66
- fxamacker/ccf_draft#67
fxamacker added a commit to onflow/cadence that referenced this pull request Mar 14, 2023
CCF specs were updated to allow "zero or more" sortable items
rather than "one or more".

Given this, update CCF codec to check for zero items before sorting.

Relevant changes to CCF specification include:
- fxamacker/ccf_draft#66
- fxamacker/ccf_draft#67

Co-authored-by: Bastian Müller <bastian@axiomzen.co>
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