Skip to content

Audit blanket suppressMessages/suppressWarnings calls #83

@wcurrangroome

Description

@wcurrangroome

Problem

There are 12 suppressMessages(suppressWarnings(...)) call sites across the package (primarily in compile_acs_data.R, generate_codebook.R, table_registry.R, and auto_percent.R). These suppress ALL diagnostics, including potentially important ones:

  • API rate-limit warnings from tidycensus
  • Invalid variable code warnings
  • Deprecation notices from dependency packages
  • Geometry-related warnings from tigris/sf

This makes debugging production issues difficult since errors in upstream dependencies are silently swallowed.

Suggested approach

Audit each site and either:

  1. Replace with withCallingHandlers() targeting specific known-noisy messages (e.g., tidycensus data source messages)
  2. Remove suppression entirely where the messages are useful
  3. Document why suppression is needed where it must remain

Context

Identified during code review. Most sites wrap tidycensus::load_variables() or tidycensus::get_acs() calls, which emit noisy but harmless messages about data source/year.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions