Skip to content

Bind the bare databases/tables globals to an isolated application's branches #3053

Description

@dawsontoth

Problem

A branched application reaches its branch only through import { databases } from 'harper'. The bare databases and tables globals are process-wide and reach the base, silently (components/Application.ts:125-128).

In an isolated application's dedicated worker, the globals belong to that one application, so they could resolve to its branches. #642 lists per-application globals under thread isolation. Until then, a PR preview of an application that uses the globals writes to the shared data it was supposed to fork.

Proposal

In a dedicated worker whose application declares branchedDatabases, resolve the global databases, tables and defineTable through the same branch view as the scoped exports.

Part of #3042.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    Priority

    P2

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions