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

Fix roxygen2 issue with all/all.equal ambiguity #339

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MichaelChirico
Copy link

You are affected by r-lib/roxygen2#1587. Came across your package while looking for a solution, so sharing what I found.

Copy link
Contributor

github-actions bot commented Oct 13, 2024

✅ All contributors have signed the CLA
Posted by the CLA Assistant Lite bot.

@MichaelChirico
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@MichaelChirico
Copy link
Author

recheck

@averissimo
Copy link
Contributor

Thanks for the PR

I don't think this roxygen2 issue affects this package as the all.equal method is only meant to be available during tests.

We achieve that by registering the S3 method in a {testthat} helper.

if (testthat::is_testing()) {
registerS3method("all.equal", "join_keys", all.equal.join_keys)
}

@gogonzo do you want to revisit the export of this method?

Initially, we were hoping waldo would merge r-lib/waldo#186 as well as moving to {testthat} v3, but given that PR is almost 1 year old that seems unlikely.

@gogonzo
Copy link
Contributor

gogonzo commented Oct 14, 2024

I don't think either that this affects us.

@MichaelChirico
Copy link
Author

to clarify I'm referring specifically to this:

\method{all}{equal.join_keys}(target, current, ...)

@llrs-roche
Copy link
Contributor

From previous experience registering the right S3 method helps with the dispatch, even if it is not exported (no exportMethods(all) or exportMethods(all.equal)) it must be registered to work well. I'm not familiar enough with join_keys and join_key_set but it is important on this context.

I also consider this very minimal (see the last commit) and without issues on a local check.

@m7pr
Copy link
Contributor

m7pr commented Nov 8, 2024

r-lib/waldo#186 got merged

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.

5 participants