-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-48631: [R] Non-API calls: 'ATTRIB', 'SET_ATTRIB' #48634
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
Conversation
|
CI failure R / AMD64 Ubuntu 24.04 R 4.4 Force-Tests true (pull_request) due to unrelated issue (downloading Parquet file from our repo) |
|
Alternative approach to try based on conversation with CRAN folks:
@jonkeane - I'm leaning towards not implementing this approach due to advice from 🤖
|
|
It seems they added |
Ah, that's great, thanks! I guess we wanna stick with this workaround for now so that we're still compatible with older versions of R which don't have these new functions but can open a ticket to replace it with them later. |
You can probably backport these functions like below. In my understanding, since Writing R Extension explains how to backport #if R_VERSION < R_Version(4, 6, 0)
SEXP R_altrep_class_name(SEXP x)
{
return ALTREP(x) ? CAR(ATTRIB(ALTREP_CLASS(x))) : R_NilValue;
}
#endif |
|
I guess they still would most likely get flagged up in our CRAN checks, and I don't see that one listed explicitly; tempted to leave as-is to save the hassle. @jonkeane - given you're submitting it, what do you think? |
|
If I understand correctly, https://cran.r-project.org/web/checks/check_results_arrow.html Anyway, I don't have strong opinion. I think you can choose the one you feel easier and/or safer! |
The backport very much should work. Here is an example that we did for Lines 390 to 400 in 0b9f06c
So if we want to do that now, that would be cleaner and we won't need to come back to it. But I also would be ok to merge this as is with a follow on to do that cleanup if that's more expedient (with the upcoming release + time we all have available to dedicate to this). If we do defer it and come back to it, mind making a follow up ticket if you haven't already? |
|
Right, I see, my mental model of how this works was wrong; - I didn't realise that they run their checks for non-API calls on the built package rather than some kind of static analysis, and hence why the backport stuff is fine. Thanks for the suggestion @yutannihilation and helping me find that other one there @jonkeane. Will merge once CI passes. |
Rationale for this change
CRAN complains about non-API calls
What changes are included in this PR?
Update those items to use alternative approaches
Are these changes tested?
Well, if the tests pass I think we're good?
Are there any user-facing changes?
Nope
Summary of AI changes
🤖 Generated with Claude Code
Have added comments inline regarding assumptions behind changes, and where I questioned those to try to verify it.
Sources referenced in approach:
ATTRIB,SET_ATTRIBRdatatable/data.table#7487 - similar fixesDUPLICATE_ATTRIB