Skip to content

Conversation

@SteveBeckerMSFT
Copy link
Collaborator

@SteveBeckerMSFT SteveBeckerMSFT commented May 1, 2025

Implements @inexorabletash's suggestion to fix #452.

The following tasks have been completed:

  • [X ] Confirmed there are no ReSpec/BikeShed errors or warnings.

Preview | Diff

1. If |cursor|'s [=cursor/key only flag=] is false, then:

1. Let |serialized| be |found record|'s [=index/referenced value=].
1. Let |serialized| be |found record|'s [=/value=] if |source| is an [=/object store=], or |found record|'s [=index/referenced value=] otherwise.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Follow up question: Can this fail? Do we need error handling in these steps?

Copy link
Member

@inexorabletash inexorabletash May 1, 2025

Choose a reason for hiding this comment

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

  • If no record is found, then the cursor hits end of range. (current step 9.2)
  • If a record is found, then it definitely has a value or referenced value (or the implementation has a bug)
  • Right now the steps assert that StructuredDeserialize can never fail. See Is it really true that StructuredDeserialize can't throw in this spec? #391 for potential concerns (so this is tracked elsewhere)

Copy link
Member

@inexorabletash inexorabletash left a comment

Choose a reason for hiding this comment

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

LGTM!

@inexorabletash inexorabletash merged commit 896d5be into main May 1, 2025
2 checks passed
github-actions bot added a commit that referenced this pull request May 1, 2025
SHA: 896d5be
Reason: push, by inexorabletash

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

Possible logic inversion in iterate a cursor

3 participants