Skip to content

Build layer: the tree compiler as driver fails every pcre2 corpus action with "generic comptime function expects 1 type argument(s), found 0" (the pinned seed evaluates them) #1804

Closed

Description

@ehartford

build/corpus.w documents re-migration as WITH=out/release/bin/with out/release/bin/with build :<stem>-promote ("a migration runs in the build driver's own compiler"). With the release binary of main (with v0.15.2.1-g99939352f) as the driver, every pcre2 corpus action fails during comptime evaluation:

$ WITH=out/release/bin/with out/release/bin/with build :pcre2-prepare-reference
error: action target 'pcre2-prepare-reference' failed during comptime evaluation: generic comptime function expects 1 type argument(s), found 0
$ WITH=out/release/bin/with out/release/bin/with build :pcre2-migrate --no-deps
error: action target 'pcre2-migrate' failed during comptime evaluation: generic comptime function expects 1 type argument(s), found 0

The pinned seed (src/main build :pcre2-prepare-reference) evaluates the same build files green, so this is a comptime-evaluator regression between the seed and HEAD (src/ComptimeEval.w:7465 / :7822 emit the message). The migrate action gets as far as writing out/pcre2_migrated (34 modules, bundle.w, UPSTREAM — the migration itself and pcre2_finish run) before the failure, so the failing call is late in run_corpus_migrate_action or in the prepare tree's helpers (pcre2_normalize_heap_output and friends, build/pcre2.w:67-150).

Found while re-migrating std.re for #1774 (the enumerator typing fix): the re-migration had to be assembled by hand from the seed-driven prepare step, the release-driven migrate step's output and a copy in place of :pcre2-promote.

Expected: the documented command works with the tree compiler, and a seed-vs-tree evaluator divergence in the build layer is caught by a lane (the build files are the one program both compilers must agree on).

Activity

  1. ehartford commented on Sep 29, 2026

    @ehartford
    ContributorAuthor

    Seen on stack #1898 (fix-globals), with stage1 and with the tree's release binary as driver: every corpus migrate action (:pcre2-migrate, :tommyds-migrate, :zlib-migrate, :c-algorithms-migrate) fails this way, and in each case the migration itself completes and publishes out/<name>_migrated before the failure (timestamps match the run). So the failing call is after fs.rename(generated, output) in run_corpus_migrate_action (build/corpora.w): the final print("migrated " ++ … corpus_count_w_files(…) … corpus_abs(…)). Under lldb the ComptimeEval.w:7489/:7846 breakpoints are never hit in the driver process (the evaluation runs in a spawned child), so this narrows the site but does not pin the line. Workaround used: read out/<name>_migrated after the red action.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions