Closed bspalat closed 10 months ago
Thanks for the report. This clearly has to do with how R resolves ambiguous (more than one period) names into <method>.<class>
. Definitely not intentional behavior, and if someone were to contribute a fix in a PR, along with unit tests, I would try to merge it and possibly roll a bugfix release (say 1.3.2
). But I personally don't know exactly how to fix this and would probably have to spend some time to figure that out, so I'm unlikely to find the time myself, unfortunately.
Ah, I was wondering why the S3
support failed on me recently and went back to registering manually.
I will research it and fix it.
But note that there might be no way to distinguish between the hypothetical cases mentioned in https://github.com/rticulate/import/pull/65#issue-1213228948
A hypothetical
t.test.data.frame
might then consist oft
generic for thetest.data.frame
class,t.test
generic for thedata.frame
class andt.test.data
generic for theframe
class and there is no easy way to resolve this ambiguity.
I was able to find a bug in my original implementation.
Note that we are still assuming that the generics doesn't have a dot in name. This is probably a reasonable assumption for new user-generated generics, but some historical generics might suffer. Users can always identify and register these issues manually.
Awesome, thanks for the fix, we should see this on CRAN within a day or two, se the PR (#87) for detail.
Hello there and thanks for an awesome package!
I stumbled upon the fact that
import(..., .S3 = TRUE)
doesn't handle S3 methods for classes likedata.frame
. Apparently, the class doesn't get processed completely which is even hinted at with a warning. Short example:but doesn't work when imported:
The feature is labeled as experimental and the above isn't difficult to circumvent, but I suppose the behaviour isn't intentional.
Once again, thanks for all the work :)