Skip to content

Makefile provider gen groups list a target the generator no longer emits #572

Closed

Description

@David-Noble-at-work

Found during #568 step 3, diagnosing why GOOS=linux make build dies with an exec-format error.

The defect

Every provider's grouped generation target lists gen/node_builder.gen_test.go:

$(P)/appnet/action_names.gen.go \
$(P)/appnet/gen/receiver_type.gen_test.go \
$(P)/appnet/gen/action.gen_test.go \
$(P)/appnet/gen/node_builder.gen_test.go \
$(P)/appnet/gen/provider.gen.go \
$(P)/appnet/gen/resource.gen.go &: $(P)/appnet/provider.go $(P)/appnet/resource.go | $(STAR)

The generator retired that emission — generate.star:1197: "node_builder_test emission retired with
NodeBuilder (Phase 5)"
— so no build can ever produce it. Under GNU Make 4.4.1's grouped-target (&:)
semantics, a missing group member makes the whole group stale, permanently.

The groups are also missing a member in the other direction: the generator does emit
gen/module.gen_test.go for the access=both providers (file, json, platform, regex, template, yaml), and no
group lists it — so make does not know about a real output.

Consequences

  1. Every make build regenerates every provider, every time. Slow, noisy, and it masks real staleness.
  2. GOOS=linux make build and GOOS=windows make build cannot pass on any host: the regeneration recipes
    exec freshly built tools (devlore-inventory, star) that were compiled for the target OS —
    fork/exec ...: exec format error at Makefile:546. Cross-platform build verification is reduced to
    make vet under GOOS, which type-checks but does not link or generate.

Generation itself is deterministic and correct — after two full regeneration cycles on 0a96a5e2 + the step-3
tree, every generated file was byte-identical to develop HEAD (verified by blob SHA against the GitHub tree).
The defect is only the Makefile's member lists.

Fix

Align each group's member list with the generator's actual output set for that provider — drop
node_builder.gen_test.go everywhere, add module.gen_test.go where it is emitted.

Acceptance: make build run twice regenerates nothing on the second run, and GOOS=linux make build
passes on a darwin host.

Activity

  1. added
    bugSomething isn't working
    Severity:HighA supported path is broken with no workaround
    Epic:QualityCoverageCode quality, coverage, and the lint gates
    choreMaintenance work on the repo: build, CI, tooling, process
    and removed
    bugSomething isn't working
    on Aug 20, 2026
  2. added
    bugSomething isn't working
    and removed
    bugSomething isn't working
    on Aug 21, 2026
  3. David-Noble-at-work commented on Aug 21, 2026

    @David-Noble-at-work
    ContributorAuthor

    Cross-reference: #598 (make build cross-compiles every supported platform by default, chore under #453) forces this fix — the stale gen groups are the known blocker for any cross-GOOS make build.

  4. David-Noble-at-work commented on Aug 24, 2026

    @David-Noble-at-work
    ContributorAuthor

    Fixed in #640 (merged to develop as f2bfff45).

    gen/node_builder.gen_test.go removed from all 16 grouped targets, and the comment block above them
    rewritten to describe what the generator actually emits — with the reason recorded, so the next member
    added gets checked against the generator rather than assumed.

    Verified, not assumed: a second consecutive make build now runs zero codegen invocations. Before
    the fix, the unreachable member left every group permanently stale under GNU Make 4.4.1's grouped-target
    (&:) semantics, so all of them re-ran on every build.

    The second half of this issue was already correct. The claim that the groups are "also missing a member
    in the other direction" does not hold against the tree: all 19 providers that emit gen/module.gen_test.go
    already list it. Only the node_builder half was live.

    A separate defect surfaced while verifying this one and is tracked as #639: GOOS=linux make build still
    fails because GOOS/GOARCH are ambient and reach the host-tool builds, so go run ./cmd/devlore-inventory
    cross-compiles and then tries to execute a Linux binary on the host. It is unrelated to the grouped targets.

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

    Epic:QualityCoverageCode quality, coverage, and the lint gatesPriority:P1This cycleSeverity:HighA supported path is broken with no workaroundchoreMaintenance work on the repo: build, CI, tooling, process

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions