Skip to content

labelle init scaffolds stale projects: pins assembler 0.40.0 / 0.40.0-era packages, no .y_axis (breaks on upgrade) #322

Description

@apotema

Problem

labelle init on a fresh machine scaffolds a project pinned to assembler 0.40.0 and 0.40.0-era packages, with no .y_axis in project.labelle. The scaffold is stale from the first build and breaks as soon as the assembler is upgraded.

Repro (release CLI v1.51.0, macOS)

labelle init foo && cat foo/project.labelle

yields:

.core_version = "0.40.0",
.engine_version = "0.40.0",
.gfx_version = "0.40.0",
.labelle_version = "0.40.0",
.assembler_version = "0.40.0",

— no .y_axis. Current assembler releases are v0.91.0; current core is v1.26.0.

Root cause

src/cli/assembler.zig:

pub const DEFAULT_ASSEMBLER_VERSION = "0.40.0";

init resolves the "CLI-paired default assembler" (assembler_proc.zig / init.zig), which is this constant — untouched since the thin-driver migration (#217). So every labelle init without an explicit --assembler-version downloads and runs assembler 0.40.0, whose scaffold template:

  • pins its own 0.40.0-era package versions, and
  • predates the .y_axis key (introduced by labelle-assembler#371/#372), so it never writes one.

The project then records assembler_version = "0.40.0". The moment the user (or labelle upgrade, or a manual bump) moves the project to a modern assembler, generate hard-fails:

labelle-assembler: project.labelle is missing `.y_axis`: set `.y_axis = .up` ...
error: labelle-assembler: generate failed: MissingYAxis

— i.e. the CLI scaffolds projects its own current assembler line refuses to build.

Also check

  • src/cli/upgrade.zig (~line 94-103): the assembler-upgrade path inserts DEFAULT_ASSEMBLER_VERSION as the target assembler_version for projects that lack the pin — today that would downgrade them to 0.40.0. Same constant, same fix, but verify the floor logic in assembler_proc.zig ("paired default declares a higher minimum") still makes sense after the bump.

Acceptance

  • labelle init on a cold machine scaffolds a project whose pins match the CLI's current paired set (assembler 0.91.x-era) and includes .y_axis.
  • labelle init foo && labelle run foo works out of the box, no manual edits.
  • Bumping DEFAULT_ASSEMBLER_VERSION is covered by a smoke test (init → generate succeeds against the scaffolded pins), so the constant can't silently rot again — or the default is resolved dynamically (latest release) instead of hard-coded.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdistributionPackaging / zero-install distribution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions