Skip to content

MINOR: [R] Skip translation tests if NLS is not enabled#49874

Merged
jonkeane merged 1 commit intoapache:mainfrom
MichaelChirico:patch-5
Apr 27, 2026
Merged

MINOR: [R] Skip translation tests if NLS is not enabled#49874
jonkeane merged 1 commit intoapache:mainfrom
MichaelChirico:patch-5

Conversation

@MichaelChirico
Copy link
Copy Markdown
Contributor

Rationale for this change

R builds with --disable-nls and no -DENABLE_NLS=1 will not translate any messages, so associated tests don't really make sense.

What changes are included in this PR?

Skip such tests by reading from capabilities().

Are these changes tested?

GHA/CI

Are there any user-facing changes?

No

Could this be solved another way?

Yes, I think we could just use withr::with_language() instead which has its own capabilities() check:

https://github.com/r-lib/withr/blob/22e392c9cc13efaa9ba042bb193991f78316edb1/R/language.R#L81

Copy link
Copy Markdown
Member

@jonkeane jonkeane left a comment

Choose a reason for hiding this comment

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

Thanks for this. This should be just fine to merge regardless, but do you happen to have a way that you test this in CI? I would be totally fine to add --disable-nls somewhere in our matrix, though ideally we won't need to build R from source just for that. Do you have any CI that does that?

@github-actions github-actions Bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels Apr 27, 2026
@MichaelChirico
Copy link
Copy Markdown
Contributor Author

Don't have one handy, I'd bet re-building R (needed for --disable-nls to take hold, AFAIK) is overkill. I'm also not sure how useful mocking is here. WDYT? Worth pursuing further?

@jonkeane
Copy link
Copy Markdown
Member

Agreed, building R from source is overkill. Let's merge this as is — I don't think it needs anything else (or a news entry, etc.)

@jonkeane jonkeane merged commit 81bd5a9 into apache:main Apr 27, 2026
14 of 16 checks passed
@MichaelChirico MichaelChirico deleted the patch-5 branch April 29, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants