Skip to content

zfa build reports success but writes 0 outputs when build.yaml is missing (no zfa command creates it) #276

Description

@arrrrny

Context

Blocking roadblock found while smoke-testing zuraffa v6 (goal: build a ZikZak-class app at apps/zikzak_demo using ONLY zfa commands). zfa CLI v6.0.0 (development branch, freshly rebuilt via scripts/rebuild.sh).

What I ran

# 1. Fresh app scaffolded
flutter create zikzak_demo --empty
# (pubspec.yaml wired with zuraffa_flutter path dep, build_runner, zorphy_annotation, zorphy overrides)

# 2. Entity created fine
zfa entity create -n GrocerySubVariety --field id:String --field name:String --field 'localizedName:Map<String,String>?'

# 3. Build — expected .zorphy.dart + .g.dart
zfa build

Expected

zfa build runs build_runner with the zorphy builder registered and generates grocery_sub_variety.zorphy.dart + grocery_sub_variety.g.dart (exactly what the reference app ~/Developer/zik_zak has via its build.yaml).

Actual

zfa build completed with 0 outputs generated, and reported success:

W These options have been removed and were ignored: --delete-conflicting-outputs
Built with build_runner/aot in 705s; wrote 0 outputs.
✅ Build completed successfully

No .zorphy.dart / .g.dart files exist afterward. The project is missing build.yaml, and zfa provides no command that creates it (grep over lib/src/** for build.yaml writes returns nothing; zfa entity create, zfa make, zfa build do not scaffold it).

Root cause

  • A zfa-generated entity requires the zorphy:zorphy builder, which must be registered in a build.yaml.
  • The reference project has one (hand-written historically); a brand-new zfa workflow never emits it.
  • zfa build does not detect the missing builder registration — it exits 0 with wrote 0 outputs, a silent false success.

Suggested fix

  1. zfa entity create (or zfa build) should ensure build.yaml exists with the zorphy builder registered (scaffold it when absent, like buildByDefault intends).
  2. zfa build should fail loudly (non-zero exit + clear message) when the project has no builders configured and 0 outputs are produced, instead of printing ✅ success.
  3. Ties into zfa: add setup command (flutter/dart app bootstrap) and make init wire dependencies #275 (add zfa setup / zfa init bootstrap flow) — build.yaml scaffolding should be part of that too.

Impact

Blocks the entire v6 smoke test: without generated parts, zfa make output and the app cannot compile.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions