Skip to content

Tests: no Greek on base pdf() devices (green R CMD check --as-cran) - #9

Merged
wolski merged 3 commits into
mainfrom
tests-no-greek-on-pdf
Nov 2, 2026
Merged

wolski merged 3 commits into
mainfrom
tests-no-greek-on-pdf

Conversation

@wolski

@wolski wolski commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Fixes the 2 remaining test failures on main while keeping R CMD check --as-cran.

Cause

  • --as-cran sets _R_CHECK_MBCS_CONVERSION_FAILURE_=TRUE, which turns pdf() "conversion failure" warnings into errors
  • Base pdf() cannot encode Greek; outside R CMD check --as-cran this is only a warning
  • App PDF exports are unaffected: export_plot_standard() already rewrites Greek into Symbol-font spans

Changes (tests only)

  • test-level_labels.R draw_heatmap test: ASCII column labels. ComplexHeatmap::Heatmap() measures them on its own pdf(NULL) before our rewrite runs. The Greek legend still exercises the Symbol-font rewrite.
  • test-make_rep.R: no Δ in the label. The package copy of make_rep_heatmap() draws plain labels straight onto base pdf(); the app uses its own copy in server-replicability.R.
  • test-level_labels.R page counter: grepl(useBytes = TRUE). Grepping the binary PDF as text emitted ~100 warnings full of raw bytes; the CI action's failure parser then crashed with nchar(): invalid multibyte string.

Verified locally (_R_CHECK_MBCS_CONVERSION_FAILURE_=TRUE, test files level_labels + make_rep): 0 failures, 0 warnings (was 87).

The remaining check WARNING (Rd \usage) is fixed by #7.

Prepared with the assistance of an AI coding agent.

R CMD check --as-cran sets _R_CHECK_MBCS_CONVERSION_FAILURE_, which turns
pdf() conversion warnings into errors. Two tests hit that:

- draw_heatmap test: ComplexHeatmap::Heatmap() measures column labels on its
  own pdf(NULL) before our Symbol-font rewrite runs. Column labels are now
  ASCII; the Greek legend still exercises the rewrite.
- make_rep_heatmap test: the package copy draws plain labels straight onto
  base pdf(); the Delta is dropped from its label.

Assisted-by: AI coding agent
Grepping the binary PDF as text emitted ~100 "unable to translate" warnings
with raw stream bytes, on which the CI action's test-output parser crashes
(nchar(): invalid multibyte string).

Assisted-by: AI coding agent
@wolski
wolski merged commit 3d15a55 into main Nov 2, 2026
3 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.

1 participant