Skip to contents

Resolve this value while constructing the pipeline. The target factory embeds the snapshot in its command, so changes affect local targets invalidation as well as the shared key. This is a declaration, not discovery of hidden inputs.

Usage

shared_context(
  ...,
  files = list(),
  options = character(),
  env = character(),
  packages = character(),
  locale = FALSE
)

Arguments

...

Named immutable values, such as image digests, database snapshots, model releases, or explicit method definitions.

files

Named paths or shared_file() descriptors for model/executable contents. Ordinary files are hashed once per call. Descriptors reuse their IDs.

options

Names of R options to snapshot.

env

Names of nonsecret environment variables to snapshot.

packages

Additional installed method/provider packages to fingerprint.

locale

TRUE to include the current locale string.

Value

A plain list of declared values and snapshots. It can be inspected and its values passed explicitly to functions instead of rereading ambient state.

Details

Never include credentials: targets saves command context in metadata. A version label alone does not identify a replaced binary or model; use its content identity. Directory resources require an explicit immutable ID.