Skip to content

meta migrate offline paths don't thread config providers (custom subtypes fail) #157

Description

@dmealing

Problem

The offline migration paths — runBaseline and runOfflineGenerate in packages/cli/src/commands/migrate.ts — call loadMemory(metaRoot) without the consumer providers from metaobjects.config.ts. The postgres/d1 migrate paths and meta gen already thread config.providers.

So a project that registers a custom subtype via a config provider (e.g. a TS-only view.* provider) hits Unknown type <subtype> on offline meta migrate / meta migrate baseline, even though meta gen loads the same metadata fine. This forces a workaround (temporarily stripping the custom nodes from the metadata before generating a migration).

Fix

Load the config up front in both offline functions and pass providers to loadMemory, mirroring the DB paths. Fold the existing later naming-strategy config read into the same up-front load.

Verified locally: CLI tests pass (356/0); with the fix, offline meta migrate loads a config-registered view.* subtype natively — no strip workaround. A patch is ready; happy to open a PR.

Related

Part of the broader consumer-provider CLI-parity question (separate issue) — this one is the TS-internal consistency bug (TS migrate should match TS gen).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions