Skip to content

Cover callbacks in S7 shared class definitions - #646

Merged
jimhester merged 4 commits into
r-lib:mainfrom
t-kalinowski:fix/s7-compatibility-20261012
Oct 16, 2026
Merged

jimhester merged 4 commits into
r-lib:mainfrom
t-kalinowski:fix/s7-compatibility-20261012

Conversation

@t-kalinowski

Copy link
Copy Markdown
Member

Coverage of installed S7 classes currently reports zero for property getters, setters, and validators with development S7. Installed constructors can be byte-compiled copies of the definition used by instances.

Traverse the shared class definition when gathering callback replacements, so instrumentation reaches the closures that instance access calls. Classes without the shared reference retain the existing traversal.

@jimhester
jimhester merged commit 3ce8274 into r-lib:main Oct 16, 2026
13 checks passed
@jimhester

Copy link
Copy Markdown
Member

Thanks, the change looks good. I also added a test against the dev S7 in the build matrix to verify this change and to catch any coverage regressions for dev S7 in the future.

@t-kalinowski

Copy link
Copy Markdown
Member Author

Thank you!

@t-kalinowski

Copy link
Copy Markdown
Member Author

Thanks for merging these changes! I'm planning to submit the next version of S7 to CRAN on November 16 (see RConsortium/S7#786).

Would you be able to submit an updated version of covr with these compatibility updates to CRAN before then? Please let me know if you need more time or if there’s anything I can help with.

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