Skip to content

Make compatible with ‘box’ 1.2.1#184

Merged
radbasa merged 2 commits into
Appsilon:mainfrom
klmr:fix/box-1.2.1
Dec 9, 2025
Merged

Make compatible with ‘box’ 1.2.1#184
radbasa merged 2 commits into
Appsilon:mainfrom
klmr:fix/box-1.2.1

Conversation

@klmr

@klmr klmr commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

‘box’ requires an update to fix CRAN issues due to changes to the R C API visibility.

These change have unfortunately required changes to the return type of box:::load_mod. This PR integrates that change into ‘box.linters’ while keeping it compatible with past versions.

  • The change is thoroughly documented.
  • The CI passes (R CMD check, linter, unit tests, spelling).
  • Any generated files have been updated (e.g. .Rd files with roxygen2::roxygenise())

klmr added 2 commits November 26, 2025 12:10
In ‘box’ version 1.2.1, the return type of `box:::load_mod` has changed.
This PR integrates that change into ‘box.linters’ while keeping it
compatible with past versions.
@radbasa radbasa self-requested a review November 27, 2025 07:07

@radbasa radbasa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, in principle. Will need to re-test when box@1.2.1 is published.

Regression tested with testthat@3.3.1

Screenshot 2025-11-27 at 3 25 19 PM

Comment on lines +32 to +33
mod_ns <- if (utils::packageVersion("box") < "1.2.1") {
load_mod(info)

@radbasa radbasa Nov 27, 2025

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally with box@1.2.0, testthat@3.2.3

Screenshot 2025-11-27 at 3 18 03 PM

Comment on lines +34 to +36
} else {
load_mod(info)$mod_ns
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Untested. box@1.2.1 is not yet on CRAN.

@klmr klmr Nov 27, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, apologies! I had meant to link to the development build. As you probably saw from the email conversation, ‘box’ 1.2.1 will only be released on CRAN after ‘box.linters’ is updated to match.

You can test ‘box’ 1.2.1 locally by installing the dev build branch, e.g. via ‘pak’:

pak::pak('klmr/box@build')

@radbasa radbasa Dec 1, 2025

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with box@1.2.1

Screenshot 2025-12-01 at 6 45 16 PM

Confirmation that running with box@1.2.1 takes the new branch from {covr}:
Screenshot 2025-12-01 at 6 46 16 PM

BTW, @klmr , covr@3.6.5 recently went live. It now supports {box} via covr::file_coverage().

@radbasa radbasa merged commit 81b1a4c into Appsilon:main Dec 9, 2025
5 checks passed
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.

3 participants