Skip to content

fix: declare hms in Imports (required by RSQLite, not declared by it) - #22

Open
eliotmcintire wants to merge 1 commit into
developmentfrom
fix/declare-hms-required-by-rsqlite
Open

fix: declare hms in Imports (required by RSQLite, not declared by it)#22
eliotmcintire wants to merge 1 commit into
developmentfrom
fix/declare-hms-required-by-rsqlite

Conversation

@eliotmcintire

Copy link
Copy Markdown
Collaborator

Fixes the one failing leg on #20ubuntu-latest (release, nosuggests):

* checking examples ... ERROR
Error in check_suggested("hms", "dbConnect") :

Why

sqlite_connect_db() calls:

RSQLite::dbConnect(..., extended_types = TRUE)   ## for DATETIME

extended_types = TRUE makes RSQLite return DATETIME columns as hms/POSIXct, which requires hms at runtime. But RSQLite declares hms in its Suggests, not Imports — so nothing in the dependency graph guarantees it is installed.

This is invisible in a normal check, where Suggests are present anyway. It fails under _R_CHECK_DEPENDS_ONLY_=true (the no-suggests leg), which builds a library containing only this package's Depends/Imports/LinkingTo.

The requirement is real and RSQLite does not state it correctly, so climateData declares it directly.

Where the rationale lives

DESCRIPTION is DCF and cannot carry comments, so the explanation sits next to the dbConnect call in R/ClimateNA_createTiles.R — where someone changing extended_types will actually see it.

Note

The no-suggests leg is new to this repo; it arrived with the migration to the org reusable workflow and found this on its first run. The bug was always there — nothing was testing for it.

🤖 Generated with Claude Code

https://claude.ai/code/session_012DVjmY3im9Xak7tXLSMGCa

The no-suggests CI leg fails with:

  * checking examples ... ERROR
  Error in check_suggested("hms", "dbConnect") :

sqlite_connect_db() calls RSQLite::dbConnect(extended_types = TRUE), which
makes RSQLite return DATETIME columns as hms/POSIXct and therefore requires the
hms package at runtime. RSQLite declares hms in its Suggests, not Imports, so
nothing in the dependency graph guarantees it is installed.

That is invisible in a normal check -- Suggests are installed anyway -- but
fails under _R_CHECK_DEPENDS_ONLY_=true, which builds a library containing only
this package's Depends/Imports/LinkingTo.

The requirement is real and RSQLite does not state it correctly, so climateData
declares it. Rationale recorded next to the dbConnect call rather than in
DESCRIPTION, which is DCF and cannot carry comments.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012DVjmY3im9Xak7tXLSMGCa
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