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

Make traversal.WalkTransforming() work #516

Merged
merged 1 commit into from
May 1, 2023

Conversation

EdSchouten
Copy link
Contributor

It looks like the current implementation never calls Selector.Decide(), meaning it always attempts to transform the root node, even if it shouldn't be matched.

@rvagg
Copy link
Member

rvagg commented Apr 25, 2023

Thanks for the contribution @EdSchouten! Would you mind having a look at the tests to see if you can either add a new one or adjust an existing one to exercise this?

It looks like the current implementation never calls Selector.Decide(),
meaning it always attempts to transform the root node, even if it
shouldn't be matched.
@EdSchouten EdSchouten force-pushed the eschouten/20230424-walk-transforming branch from ea97bc8 to 2944c1a Compare April 30, 2023 07:53
@EdSchouten
Copy link
Contributor Author

EdSchouten commented Apr 30, 2023

Sure thing! I've just added some basic testing coverage, based on the tests we already have for WalkMatching(). I have confirmed that these tests fail if this change is not applied. Hope that helps!

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.

👌 beautiful! thanks so much for finding and fixing this!

@rvagg rvagg merged commit 046a9b4 into ipld:master May 1, 2023
@EdSchouten EdSchouten deleted the eschouten/20230424-walk-transforming branch May 1, 2023 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🎉 Done
Development

Successfully merging this pull request may close these issues.

2 participants