Repository navigation
Test suite issues in version 1.1.5 #159
Description
Activity
I don't have a solution, but the "expected" strings contain
×, U+00D7 MULTIPLICATION SIGN, while the "actual" strings containx, U+0078 LATIN SMALL LETTER X.- Am Sun, Jan 22, 2023 at 02:49:30AM -0800 schrieb aitap:I don't have a solution, but the "expected" strings contain `×`, U+00D7 MULTIPLICATION SIGN, while the "actual" strings contain `x`, U+0078 LATIN SMALL LETTER X.Ahhh, good catch. Does the test work at your site so is it an issue that is specific for the Debian environment at my site? Kind regards, Andreas.
- The tests pass on my machine but fail if I set LC_ALL=C with a similar set of error messages. (My system cannot represent \u00d7 when I set LC_ALL=C, so your environment must be using a Latin-1 locale.)
We explicitly set
LC_ALL=C.UTF-8for the test . If I setLC_ALL=en_US.UTF-8the issue becomes at least obvious:- "A data.frame: 2 x 6" + "A data.frame: 2 \u00d7 6"I failed with setting
LC_ALL=en_US.ISO-8859-1. How is your exact locale setting?
I'd recommend you'd adapt to UTF-8 which is somehow a widely accepted default.
Kind regards, Andreas.- Sorry I wasn't entirely clear. My locale is normally ru_RU.UTF-8, and the tests pass when I'm using that locale. The test also passes if I run it under C.UTF-8 on my Debian oldstable machine. The package uses nchar('\ud7') != nchar(capture.output(cat('\ud7'))) as a test to decide whether to use the fallback character, which shouldn't be failing under C.UTF-8: https://github.com/IRkernel/repr/blob/f51ce4abac9824041cc27fee698e644cd181e059/R/repr_matrix_df.r#L18-L30 What's also interesting is that I can't get the test to fail under LC_ALL=en_GB.iso885915. '×' seems to be at 0xD7 in both ISO-8859-1 and ISO-8859-15, at least according to Wikipedia. Just in case, does your test environment have all the relevant locales generated? Your example looks to me like it doesn't have en_US.UTF-8, which makes the C runtime fall back to "C".
I think what might be happening here is that the package level code here is executed at build time (R packages are compiled to bytecode when building them from source)
Therefore we might be able to improve things by caching the characters at package initialization instead of on package build time.
Please check if the debian CI can handle with the version of this package from #160
Please report here if the problem persists, although I don’t think there’s anything that can be done on the repr side
I’ll do that once and publish v1.1.6. If you still run into problems there, we’ll have to collaborate in another way, without me pushing speculative fixes, since the CRAN maintainers don’t like frequent updates like that.
Hi,
I wanted to upgrade the repr package in Debian. Unfortunately there are some admittedly strange issues where diff creates some differences that do not really look like different strings. The test suite output starts with
Feel free to find the full build log in the Debian CI.
Kind regards, Andreas.