← Back to all sparks
S

stbl

DEVOPS
Velocity2.5

stbl keeps tightening its own defaults, accepting breakage now to avoid silent wrongness later.

r-packageinput-validationtype-coercionerror-handlingdeveloper-tooling
Current state
A small R utility for stabilising function arguments — coercing, validating and erroring predictably on user input. Four releases across roughly two years, with the pace picking up in 2026. Every substantive release so far has led with a Breaking changes section, and the changes share a direction: behaviour that used to pass silently now errors, and permissive defaults become strict.
Where it's heading
The package is converging on a single principle — an argument checker that quietly accepts bad input is worse than none. 0.3.0 flipped the scalar functions to reject NULL and zero-length input by default; 0.4.0 made to_df() and to_lst() error on extra arguments in dots that were previously discarded. Alongside the tightening, the surface is expanding beyond coercion into condition signalling: pkg_abort() has been joined by pkg_inform() and pkg_warn() with a matching class hierarchy, plus testthat helpers that assert on those classes and snapshot the output. That positions stbl less as a coercion helper and more as the argument-and-condition layer for a package author's whole public API.
Prediction
Expect the condition-signalling side to keep growing toward parity with the coercion side, and further default-tightening releases each fronted by a breaking-changes list.

Recent moves

  1. 18d ago

    Classed warnings and messages join pkg_abort; dots are no longer silently discarded

    Extends the package past coercion into condition signalling with pkg_inform() and pkg_warn() mirroring pkg_abort()'s class hierarchy, plus testthat expectations for both the classes and snapshot output. On the breaking side, to_df() and to_lst() now error on extra arguments instead of dropping them, and to_chr() converts named functions to strings like base::mean rather than erroring.

    View source ↗
  2. 4mo ago

    Scalar functions now reject NULL and zero-length input by default

    Flips allow_null and allow_zero_length to FALSE across the whole scalar family, requiring explicit opt-in to the old permissive behaviour. The clearest statement yet of the package's direction: a function asking for one value should not silently accept none.

    View source ↗
  3. 11mo ago

    Coercion predicates, double support, and stringr pattern matching

    Adds the is_*_ish() and are_*_ish() predicate families for testing whether an object or each element can be safely coerced, fills in the double type across to_dbl() and stabilize_dbl(), and lets stabilize_chr() take stringr regex, fixed and coll patterns with helpers for better failure messages. The predicates matter most — they let a caller ask the coercion question without triggering the error.

    View source ↗
  4. 2y ago

    DESCRIPTION and example formatting

    Formatting changes to DESCRIPTION and the examples, with no functional change. Housekeeping between the package's initial release and the feature work that followed.

    View source ↗