Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Imports:
fs,
future.apply,
glue,
hms,
methods,
parallel,
parallelly,
Expand Down
13 changes: 12 additions & 1 deletion R/ClimateNA_createTiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,22 @@ ClimateNA_path <- function(dataPath, tile = NULL, type = NULL, msy = NULL, gcm =
sqlite_connect_db <- function(dbfile) {
firstRun <- file.exists(dbfile)

## `extended_types = TRUE` makes RSQLite return DATETIME columns as hms /
## POSIXct, which requires the `hms` package AT RUNTIME. RSQLite declares hms
## only in its Suggests, not Imports, so nothing in the dependency graph
## guarantees it is installed -- `RSQLite::dbConnect(extended_types = TRUE)`
## then fails with `check_suggested("hms", "dbConnect")`.
##
## That is invisible in a normal check, where Suggests are present anyway, but
## fails under _R_CHECK_DEPENDS_ONLY_=true (the no-suggests CI leg), which
## builds a library containing only this package's Depends/Imports/LinkingTo.
## climateData therefore declares hms in its own Imports: the requirement is
## real and RSQLite does not state it correctly.
db <- RSQLite::dbConnect(
drv = RSQLite::SQLite(),
dbname = dbfile,
synchronous = "normal",
extended_types = TRUE ## for DATETIME
extended_types = TRUE ## for DATETIME -- see note above re: hms
)

if (isTRUE(firstRun)) {
Expand Down
Loading