Skip to content

[GH-50603]: [R] remove assertthat dependency + improve error messages#50525

Draft
olivroy wants to merge 25 commits into
apache:mainfrom
olivroy:assert
Draft

[GH-50603]: [R] remove assertthat dependency + improve error messages#50525
olivroy wants to merge 25 commits into
apache:mainfrom
olivroy:assert

Conversation

@olivroy

@olivroy olivroy commented Jul 16, 2026

Copy link
Copy Markdown

Rationale for this change

To get rid of assertthat dependency, and use more rlang in error handling. fix #50603

What changes are included in this PR?

  • removing assertthat dependency (replaced by rlang's type checkers)
  • adding rlang type checkers standalone files.

Are these changes tested?

By existing tests.

Are there any user-facing changes?

No, only error messages standardized.

I have not been able to install the dev version locally, so I would need the workflows to be run, so that I could adjust the tests.

@github-actions

Copy link
Copy Markdown

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

@olivroy olivroy changed the title [R] remove Assertthat dependency MINOR: [R] progress towards removing Assertthat dependency Jul 16, 2026
@olivroy
olivroy marked this pull request as ready for review July 17, 2026 12:19
@olivroy

This comment was marked as resolved.

@thisisnic

Copy link
Copy Markdown
Member

Thanks for the PR @olivroy! Can you expand more about trying to get the dev version working locally - what have you tried and what errors are you getting? It'll be easier if we help you with that first, as building iteratively on CI burns through a lot of machine time and is a really frustrating process as you wait for the builds to complete which takes much longer than just running devtools::test() once your setup is working.

@olivroy

This comment was marked as resolved.

@thisisnic

Copy link
Copy Markdown
Member

*** Unable to retrieve libarrow for version 25.0.0.9000 (windows-x86_64)

Thanks, that's helpful! It looks like there's an issue with our nightly C++ builds, so actually while we're fixing that then we can probably only easily build on CI so that's fine for now. This is super useful to know though, will have a look at getting it fixed.

Once it is fixed, I think that setting the ARROW_R_DEV environment variable to TRUE will enabled you to use the nightly builds easily: Sys.setenv(ARROW_R_DEV = "true")

@olivroy

olivroy commented Jul 17, 2026

Copy link
Copy Markdown
Author

Oh, this is great! Thanks for investigating and finding a fix! This will be useful in the future.

Hopefully, I got everything corrected this time

@olivroy olivroy changed the title MINOR: [R] progress towards removing Assertthat dependency MINOR: [R] remove assertthat dependency + improve error messages Jul 21, 2026
@olivroy

olivroy commented Jul 21, 2026

Copy link
Copy Markdown
Author

I guess this would be ready for review. I am now able to build arrow locally!

  • I finalized removing the assertthat dependency and refactored assert_is() to use rlang instead.

Edit: lints corrected now!

@kou

kou commented Jul 22, 2026

Copy link
Copy Markdown
Member

Could you open a new issue for this?
See the #50525 (comment) comment for details.

@kou
kou marked this pull request as draft July 22, 2026 00:24
@olivroy olivroy changed the title MINOR: [R] remove assertthat dependency + improve error messages [GH-50603]: [R] remove assertthat dependency + improve error messages Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[R] Remove assertthat dependency and improve error messages

3 participants