Skip to content

AppRC 0.20.0

Choose a tag to compare

@github-actions github-actions released this 04 Sep 09:05
· 88 commits to main since this release
d04b65c

💥 Breaking changes

  • Breaking: AppRC(...) now requires app_id and declares storage only
    through optional storage=rc.Storage(...); the 0.19 capability
    constructors and mode model were removed.
    Affected: Applications using env_only, storage_only,
    app_wide_config, app_wide_storage, app_name, or mode.
    Migration: Construct rc.AppRC(app_id=..., config_package=...) directly
    and add rc.Storage(selector_env_key=...) only for persistent user data.

  • Breaking: New installations use the fixed
    ~/.local/share/<app-id>/ AppRC directory on every operating system, with
    apprc.user.env, apprc.toml, and an initial storage/ root; managed
    filenames and platformdirs path selection were removed.
    Affected: Applications and users relying on platform config/data paths,
    filename overrides, .env.apprc-app, .env.apprc-storage, or
    <app>.apprc.toml.
    Migration: Rename packaged .env.shared to apprc.defaults.env, declare
    stable app_id and optional legacy_app_ids, then run
    <app> config migrate --dry-run and <app> config migrate --yes.

  • Breaking: Runtime storage selectors now accept registered names only;
    selected_storage in apprc.toml replaces path selectors persisted in a
    user dotenv.
    Affected: Users passing a path through --storage, <APP>_STORAGE, or an
    explicit dotenv, and applications shipping a selector default.
    Migration: Register the path with config storage add NAME ROOT, select
    the name, and pass only NAME; config migrate converts a released 0.19
    path selector into the named default storage.

  • Breaking: User dotenv operations use user instead of app, and
    storage-free declarations no longer expose --storage, config storage,
    or --scope storage even when an old TOML file exists.
    Affected: CLI scripts using --scope app, config app init, or storage
    controls for an app that does not declare Storage.
    Migration: Run config setup to create the always-present user dotenv and
    use --scope user; add storage=rc.Storage() in Python only when the app
    actually supports persistent storage.

  • Breaking: Machine-readable paths, doctor statuses, and provenance now use
    file-specific apprc_dir, user_dotenv, storage_dotenv,
    user_dotenv_not_ready, storage_registry_not_ready, and
    shell_dotenv_user names.
    Affected: Code parsing config JSON or provenance origin literals.
    Migration: Replace 0.19 config-home, app-config, named-storage, and
    shell_dotenv_app keys with the corresponding file-specific names.

  • Breaking: rc.field(..., required=True) and internal
    env_field(..., required=True) now reject a Python default or
    default_factory.
    Affected: Config declarations that mark a field required while providing
    every instance with a Python fallback.
    Migration: Remove required=True when the fallback is intentional, or
    remove the fallback and provide the value through the environment,
    constructor, or apprc.defaults.env.

➕ Added

  • Added a single named-storage registry model with explicit add, select,
    rename, repoint, move, and remove operations shared by the CLI and
    Textual editor. The first entry becomes selected, later additions preserve
    selection, rename follows selection, and removing the selected entry
    clears it with a warning.

  • Added config migrate for released 0.19 platform directories, custom
    <APP>_APPRC_TOML locations, legacy dotenv filenames, legacy app IDs, and
    path-valued storage selectors. It preflights conflicts and never replaces
    an existing destination.

  • Added config purge with dry-run output, malformed-registry preflight,
    symlink barriers, exact fixed-file removal, recursive deletion limited to
    registered roots inside the AppRC directory, and preservation of external
    storage data.

  • Added parameterless AppRC.ensure_bootstrapped() and
    AppRC.bootstrap_result for high-level convenience boundaries that use
    default bootstrap policy.

💔 Changed

  • Changed the default initial storage root to
    ~/.local/share/<app-id>/storage/ without a redundant default/
    component. Relative registry roots now resolve against apprc.toml.

  • Changed setup to create an empty apprc.user.env for every app and to
    register storage under the name default without writing structural
    selectors into a managed dotenv.

  • Changed selector precedence to preserve
    --env-file-overrides-os-environ: --storage wins, process and explicit
    dotenv selectors follow that option, and TOML selection is the fallback.

  • Changed repeated explicit bootstrap calls to reload the process
    environment while retaining the latest successful result; failed reloads
    keep the preceding successful result.

🗑️ Removed

  • Removed the runtime platformdirs dependency and all current-layout
    path abstraction. A small internal locator remains only to find released
    0.19 files during explicit migration.