Support more locales in R-CMD-check-occasional - #7869
Conversation
Generated via commit ef77a1e Download link for the artifact containing the test results: ↓ atime-results.zip
|
a8575a9 to
9e6ca2e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## tests-azeri #7869 +/- ##
============================================
Coverage 99.01% 99.01%
============================================
Files 88 88
Lines 17292 17292
============================================
Hits 17122 17122
Misses 170 170 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
At least partly this is blocked by an upstream error that {R.oo} can't install in |
9e6ca2e to
d47cd3c
Compare
852132f to
07ca251
Compare
|
Interesting. I've tried |
ecab787 to
625d570
Compare
625d570 to
df1d097
Compare
df1d097 to
3a54e8a
Compare
3a54e8a to
52b650c
Compare
Green CI is always good. A behavioral test against R itself would be good of the form if (strptime(...)) {
cat("Tests 168.* skipped as affected by R bug #19117\n")
} else {
...
} |
|
Surprising that the same date works in all the problem locales! passes = function() format(as.Date(strptime(strftime(as.Date('2000-11-01'), '%Y %d %b'), '%Y %d %b'))) == '2000-11-01'
for (ll in c("bo_CN", "bo_IN", "dz_BT", "km_KH", "shn_MM", "tok", "vi_VN"))
print(withr::with_locale(list(LC_TIME=ll), passes()))
# all FALSE
# .utf8 suffix needed for https://bugs.r-project.org/show_bug.cgi?id=19117#c1
for (ll in c("en_US", "zh_CN.utf8", "lv_LV", "es_ES", "ru_RU.utf8", "pl_PL", "th_TH.utf8"))
print(withr::with_locale(list(LC_TIME=ll), passes()))
# all TRUE |
|
Looking at the actual 168 series, it looks like the NOV = format(strptime("2000-11-01", "%Y-%m-%d"), "%b")
x = c("09:29:16","10:42:40","23:47:12","01:06:01","11:35:34","11:51:09")
datetimes = paste0("2011 ", NOV, c(18,18,18,19,19,19), " ", x)
DT = IDateTime(strptime(datetimes,"%Y %b%d %H:%M:%S"))AFAICT {data.table} only gets involved with the POSIXlt object received from #4719 added that, it just took the step of making |

As surfaced during review,
lv_LVis not quite enough to catch all possible collation issues.Since this CI is only run "rarely", combinatorial explosion of settings is not so big a concern.
Besides simply adding the locales, there are a few fixes to the suite to get it green. Mostly, it's because on R 3.5, we install from an ancient snapshot of CRAN:
as.nanotime(); AFAICT,nanotime()is identicalNAfor out-of-bouds indexingenv=; it turns out we can justSys.setenv()for all cases anyway.