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
Need methods package on the search path #1760
Comments
This came up with another package I was debugging in person - I could've sworn this used to work. Is it a regression in R? |
I'll bisect R later today. |
Looks like this particular problem is not a regression with R. I tried trunk This will be a lot of fun to track down :-o I can replicate in a similar setting when implementing an S3 method for class "Matrix"; it is also not dispatched for Matrix::Matrix() (which has class "lsyMatrix"):
|
Why not just add |
Will this fix the example where dplyr is loaded not attached? |
Ah, you're right :/ It would need to be more aggressive, e.g. call FWIW, |
Yes, even asked on SO a couple of years ago ;-) A workaround would be to up the affected methods to S4 generics. Still, I'm curious why the current code doesn't work, even when all of "methods" is imported into the NAMESPACE. |
After adding this for db_has_table() and importing "methods", I'm getting an error about another method:
In the C code for UseMethod(), there are too many uses of R_GlobalEnv for my taste, but I haven't investigated further. (Oops: R_GlobalContext.) |
It works flawlessly if
But it also works if
To me, it looks like (at least) this code in R is responsible for this behavior. Weird... |
It sounds like it's worth reporting to R-devel, or filing a bug -- likely that sanity check could just check that |
Should be fixed upstream eventually. |
Importing all symbols from
methods
in theNAMESPACE
does not seem to change this behavior.The text was updated successfully, but these errors were encountered: