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

waldo version requirement for tests #252

Closed
MichaelChirico opened this issue Jan 14, 2022 · 2 comments
Closed

waldo version requirement for tests #252

MichaelChirico opened this issue Jan 14, 2022 · 2 comments

Comments

@MichaelChirico
Copy link
Contributor

I know it's not a strict requirement to have version requirements for Suggested packages, but it took me quite a while to figure this out, so I figure I'd flag it.

I'm trying to update glue from 1.4.2 --> 1.6.0.

It appears waldo needs to be of a certain version for this to work. Otherwise we get a pile of test failures like:

── Failure (Line 7): glue and glue_data safe do not execute code ─────────────────────
glue("{1 + 1}") (`actual`) not equal to "2" (`expected`).

`actual` is an S3 object of class <glue/character>, a character vector
`expected` is a character vector ('2')

── Failure (Line 8): glue and glue_data safe do not execute code ─────────────────────
glue_safe("{1 + 1}") (`actual`) not equal to "5" (`expected`).

`actual` is an S3 object of class <glue/character>, a character vector
`expected` is a character vector ('5')

Luckily I'm familiar enough with testthat/waldo internals to recognize the issue from the error message -- waldo::compare() sees the classes differ on the objects; what we need is waldo::compare_proxy() to have a glue method that ignores the glue class. But I see a compare_proxy.glue method in R/utils.R -- why isn't it taking hold?

The issue appears to be that compare_proxy() is never called.

The issue resolves when I update waldo 0.2.5 --> 0.3.1 simultaneously.

I can't tell from reading waldo's NEWS what made the change (looks like 0.3.0 is likely?), nor do I have any easy way to check manually.

@jennybc
Copy link
Member

jennybc commented Jan 21, 2022

I think this is a basis for deciding the minimum version of waldo:

#212
r-lib/waldo#65
r-lib/waldo@d835b2a

which indicates we want waldo >= v0.3.0.

@MichaelChirico
Copy link
Contributor Author

thanks for investigating!

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

No branches or pull requests

2 participants