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

node/bindnode: support pointers to datamodel.Node to bind with Any #371

Merged
merged 1 commit into from
Mar 2, 2022
Merged

node/bindnode: support pointers to datamodel.Node to bind with Any #371

merged 1 commit into from
Mar 2, 2022

Conversation

mvdan
Copy link
Contributor

@mvdan mvdan commented Mar 1, 2022

(see commit message)

We missed calling nonPtrVal in a few places when reading from Go values.
The added test case panicked due to the missing call in _structIterator.

Note that the added test case only covers one of the nonPtrVal calls,
but I reckon this is enough for now, given the consistency in the code.
The other modified lines are still covered by existing tests,
just not with the particular pointer interaction.

Rod ran into the same panic while developing go-graphsync,
so this should also help unblock their progress.
@mvdan mvdan requested review from rvagg and warpfork March 1, 2022 17:02
Copy link
Member

@rvagg rvagg left a comment

Choose a reason for hiding this comment

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

👍 but this is working fine without any fixes, just needing to be careful about the pointer type (filecoin-project/go-data-transfer#305)

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