← Back to all sparks
C

carrier

INFRA · APIS
Velocity0.0

Create standalone functions for remote execution. Contribute to r-lib/carrier development by creating an account on GitHub.

carrier's 0.3.0 quietly rewrites how crated functions see each other — and breaks code that relied on the old rules.

r-packageserializationremote-executionr-libbreaking-changesenvironments
Current state
carrier packages an R function together with the data it needs so it can be shipped to another process or machine. 0.3.0 changed the semantics of functions passed through ...: they are now re-crated inside the main crate environment instead of inheriting from wherever they were defined. That fixes helper functions failing to resolve each other remotely, and stops local environments dragging large objects into the payload.
Where it's heading
Each release tightens the boundary between a crate and its surroundings. 0.2.0 introduced .parent_env defaulting to baseenv() to cut the crate off from the global search path and made unnamed ... arguments an error instead of a silent drop; 0.3.0 finishes the job by controlling the environment chain of the packed closures themselves. The package is trading backwards compatibility for predictable, self-contained payloads — a reasonable bet for something whose failures otherwise surface on a remote worker.
Prediction
The 0.1.0 notes promised an automatic dependency-detection mode to replace explicit packing; nothing since has delivered it, and with the environment semantics now settled that is the obvious next move — though the entries give no date for it.

Recent moves

  1. 11mo ago

    Crated helper functions can now see each other

    ⚡ SPARK

    Functions passed via ... are re-crated in the main crate environment, so helpers defined alongside each other resolve remotely instead of failing on the worker. It is the change the previous releases' isolation work was building toward, and it is breaking.

    View source ↗
  2. 1y ago

    crate() gains .parent_env and stricter argument handling

    A .parent_env argument defaulting to baseenv() isolates crates from the global search path, unnamed ... arguments now error rather than vanish, and .error_arg/.error_call let wrapper packages produce sensible messages. The isolation-by-default stance here sets up the breaking change in 0.3.0.

    View source ↗
  3. 3y ago

    Source references dropped from crated functions

    Crated functions no longer carry source references, and crate sizes print in human-readable form again. Small payload and display fixes.

    View source ↗
  4. 4y ago

    Initial release with explicit-only crate packing

    The first release ships a single method that requires users to name exactly what goes into the crate, with automatic dependency detection flagged as future work. That explicit contract is still the package's design centre three releases later.

    View source ↗