Skip to content

Remove legacy unified-format aliases (target: v2.0.0 major) #592

@apotema

Description

@apotema

Goal

Drop the deprecated legacy paths that were kept as a compatibility bridge for the unified scene/prefab format (RFC #560). Today every legacy site warns once on first hit; this ticket tracks the removal.

Sites to delete

labelle-engine

src/jsonc/unified_format.zig:

  • getObject("entities") legacy top-level array fallback — currently warns: "legacy 'entities' key: wrap the entity array in a 'root' block and rename it to 'children'"
  • getObject("components") fallback on prefab references — currently warns: "legacy 'components' on a prefab reference: rename it to 'overrides'"
  • Top-level "assets" key — currently ignored with warning: "legacy 'assets' key is ignored — assets are inferred from sprite references"

src/jsonc/scene_loader.zig:

  • The "legacy top-level entities array" branch at line 392
  • Position-component-on-legacy-prefabs path at line 454

src/jsonc/unified_format.zig warn-once infrastructure (the global dedup map keyed on comptime literals — can go once nothing warns).

labelle-assembler

src/config.zig:

  • The initial_scene: ?[]const u8 deprecated field
  • normalizeInitialPrefab() deprecation alias logic + the stderr deprecation notice

src/codegen/scan.zig:

  • The legacy scene-format scan path (matches the engine's unified loader)

labelle-cli

src/cli/project_config.zig:

  • The initial_scene: ?[]const u8 deprecated field (mirror of assembler)
  • normalizeInitialPrefab() helper

src/cli.zig:

  • The parsed.initial_prefab = scene rewrite at the cli#229 site that's flagged as a "deprecation bridge" — once LABELLE_SCENE is the only path, this can go too.

Pre-removal verification

Before deleting, run labelle audit unification (cli #232, shipped in v1.42.0) across:

  • bouncing-ball
  • flying-platform-labelle
  • Every project in labelle-assembler/examples/
  • Every project in labelle-cli/test-projects/

…with the deprecation warnings promoted to errors (a -Dstrict=true build flag would work, or a temporary @compileError in the legacy branches). Any project that still trips a warning gets migrated first. The audit doesn't check for legacy "entities" / "components" patterns yet — extending it is a small follow-up (filed as part of this work) or a precursor PR.

Timing

Slated for the v2.0.0 major engine bump. The current v1.x train keeps legacy support. Open question for whoever picks this up: should v2.0 also bundle other breaking-API cleanups (e.g. engine.requestedScreenshot vs engine.ScreenshotRequest.parse, or other surface that has been silently renamed) to amortize the major?

Out of scope (do not touch in this PR)

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions