Skip to content
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

feat!: Node#Length() now has an error return #532

Closed
wants to merge 1 commit into from

Conversation

rvagg
Copy link
Member

@rvagg rvagg commented Jul 7, 2023

(I wanted to see how difficult this would be; although the difficulty here doesn't account for the difficulty everywhere else that's going to be hit by such a change).

Closes: #531

ADL and other Node implementations that need to perform non-trivial work in calculating their Length(), such as by loading multiple child blocks, may encounter errors which should not be silently ignored.

Closes: #531

ADL and other Node implementations that need to perform non-trivial work in
calculating their Length(), such as by loading multiple child blocks, may
encounter errors which should not be silently ignored.
@willscott
Copy link
Member

Having to check an error every time you want to check an object's length is going to be a pretty painful change. I'd prefer to move that up to the constructor / otherwise have the error surface through existing error channels if possible.

@rvagg rvagg closed this Aug 9, 2023
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.

datamodel Length() not usable with lazy nodes (e.g. ADLs)
2 participants