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

S3 check error #203

Closed
ElianHugh opened this issue Apr 30, 2021 · 4 comments · Fixed by #204
Closed

S3 check error #203

ElianHugh opened this issue Apr 30, 2021 · 4 comments · Fixed by #204

Comments

@ElianHugh
Copy link

ElianHugh commented Apr 30, 2021

Hi again!

I was wondering whether it was possible to bypass or force the value of the s3 check in S3.r?

{Typed} exports a function as_assertion_factory, which modifies and spits out an assertion function for use in type checking. However, sourcing a module with as_assertion_factory in it results in the error:
Error in is_S3(b[[1L]]) || is_S3(b[-1L]) : invalid 'x' type in 'x || y'.
This occurs no matter what the supplied function is to the as_assertion_factory function.

This had actually been working last year, so it seems like a regression with {typed} or {box}, but I haven't been able to pinpoint what change in {box} or {typed} caused this to occur :(

I've tried to do some sneaky workarounds, like running as_assertion_factory in the on load hook, but ideally I'd like to not touch the globalenv.

Thank you for your help!

@klmr
Copy link
Owner

klmr commented Apr 30, 2021

Thanks, that’s a regression in ‘box’. Since it’s a breaking bug I’ll try to get a hotfix ready by later today!

klmr added a commit that referenced this issue May 1, 2021
klmr added a commit that referenced this issue May 1, 2021
@klmr
Copy link
Owner

klmr commented May 1, 2021

OK, fixing that was actually trivial but reproducing the bug for a regression test took me embarrassingly long. And I noticed additional errors in the function’s behaviour that also required fixing.

@klmr klmr closed this as completed in #204 May 1, 2021
klmr added a commit that referenced this issue May 1, 2021
klmr added a commit that referenced this issue May 1, 2021
@klmr
Copy link
Owner

klmr commented May 1, 2021

To use the fixed version before it is submitted to CRAN, please install hotfix-203, e.g. using ‘pak’ via

pak::pkg_install('klmr/box@hotfix-203')

(Since v1.0.2. was sent to CRAN just a few days ago, the next CRAN submission will only be in a few weeks to avoid swamping the maintainers.)

@ElianHugh
Copy link
Author

To use the fixed version before it is submitted to CRAN, please install hotfix-203, e.g. using ‘pak’ via

pak::pkg_install('klmr/box@hotfix-203')

(Since v1.0.2. was sent to CRAN just a few days ago, the next CRAN submission will only be in a few weeks to avoid swamping the maintainers.)

Great, thanks for the quick fix!

radbasa pushed a commit to Appsilon/box that referenced this issue Jul 1, 2024
radbasa pushed a commit to Appsilon/box that referenced this issue Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants