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

Remove {UN,}SET_S4_OBJECT usage #6183

Merged
merged 9 commits into from
Jul 11, 2024
Merged

Remove {UN,}SET_S4_OBJECT usage #6183

merged 9 commits into from
Jul 11, 2024

Conversation

MichaelChirico
Copy link
Member

@MichaelChirico MichaelChirico commented Jun 15, 2024

Part of #6180.

I would like to test the dogroups change. I don't think there's any reason to do UNSET_S4_OBJECT()? How could the object wound up marked as S4?

Certainly we pass tests as is. Can anyone come up with an example broken by this change? 🤔

@MichaelChirico

This comment was marked as outdated.

Copy link

github-actions bot commented Jun 15, 2024

Comparison Plot

Generated via commit 801267c

Download link for the artifact containing the test results: ↓ atime-results.zip

Time taken to finish the standard R installation steps: 11 minutes and 46 seconds

Time taken to run atime::atime_pkg on the tests: 3 minutes and 17 seconds

@ben-schwen
Copy link
Member

AFAIU IS_S4_OBJECT is also part of non exported API.

@MichaelChirico
Copy link
Member Author

I don't think that's right, here it is in Rinternals:

https://github.com/r-devel/r-svn/blob/53bbd920926a6263bf0e870fa142c6171f37ec01/src/include/Rinternals.h#L273

Well above the "Not API" section

And here it's mentioned in R-ints as the "correct" way to test S4:

https://github.com/r-devel/r-svn/blob/53bbd920926a6263bf0e870fa142c6171f37ec01/doc/manual/R-ints.texi#L1397-L1401

@ben-schwen
Copy link
Member

ben-schwen commented Jul 10, 2024

My bad, I should have linked the new section in WRE.

There we have it:

This table lists some non-API functions used in packages and the API functions that should be used instead:
IS_S4_OBJECT
Use isObject and isS4.

@MichaelChirico
Copy link
Member Author

Nice. Slightly confused why this is note showing up in our NOTE (yet?), and about the organization of the header & R-ints ref, but assume that'll be ironed out over time.

@ben-schwen
Copy link
Member

LGTM, but lets see what revdeps will say

@MichaelChirico MichaelChirico merged commit cd89ceb into master Jul 11, 2024
4 checks passed
@MichaelChirico MichaelChirico deleted the drops4 branch July 11, 2024 12:16
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

Successfully merging this pull request may close these issues.

2 participants