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

Bindnode fixes of opportunity #226

Merged
merged 7 commits into from
Aug 14, 2021
Merged

Conversation

warpfork
Copy link
Collaborator

A variety of error message improvements and polish as diffs.

I'm trying to just track these things and do target-of-opportunity work as I try to be a downstream user. The commit messages still say what and why, but the focus is... whatever I hit. :)

Copy link
Contributor

@mvdan mvdan left a comment

Choose a reason for hiding this comment

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

I know you have more fixes incoming, but probably best to wrap this up and merge it. Reviewing a five-commit PR is tricky enough as it is :)

node/bindnode/node.go Outdated Show resolved Hide resolved
node/bindnode/repr.go Outdated Show resolved Hide resolved
node/bindnode/repr.go Outdated Show resolved Hide resolved
node/bindnode/repr.go Outdated Show resolved Hide resolved
Also some other improvements marked for future work.

(I'm accumulating fixes and/or todos in patch form, as I try to use
bindnode as a downstream user.  These may not be the highest quality
patches, but it's better to strike as things are discovered than not.)
…look for a potentially complex type as the recipient.
…elimiter.

In this case, the parsing checks each complete prefix.

Errors are also returned when data is nonmatching,
rather than panicking.
Perhaps these read better?

I think there will be better results in the future from pursuing
well-structured errors.  This prose feels stilted because it's
pretending to have some consistent structure (what kind of error?
a failure of schema to unify data.  one what type?  this one.
of what detailed reason?  yada yada.  Etc).  If we actually had
that consistent structure: that would be an improvement.
@warpfork warpfork force-pushed the bindnode-fixes-of-opportunity branch from ec501fa to a34aaee Compare August 14, 2021 21:20
@warpfork
Copy link
Collaborator Author

Took all suggestions.

(Though I'm not sure I favour prioritizing error message brevity much, at the moment. So far, my experience as a user is that I want more info approximately 100% of the time, and I'd much rather get clarity at the expense of brevity. But, that said, we're also still at the "printf" stage of development on any of the errors, so I'm going to hope things are improved in general in future passes that make error handling more structured.)

@warpfork
Copy link
Collaborator Author

Gonna enthusiastically merge this, more can come later :)

@warpfork warpfork merged commit df94e6a into master Aug 14, 2021
@warpfork warpfork deleted the bindnode-fixes-of-opportunity branch August 14, 2021 23:11
@aschmahmann aschmahmann mentioned this pull request Sep 30, 2021
62 tasks
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.

2 participants