Skip to content

build/wo.w: wo_store_install_dir rewrites a $HOME-prefixed store path to the literal $HOME/...; the pcre2-wo-install-* targets report green in 0.0 s without creating the slot #1077

Closed

Description

@ehartford

Observed

In a fresh worktree with WITH_WO_DIR=$PWD/out/wo-store-test (under /Users/eric/...), with build :pcre2-wo reported

[pcre2-wo-build] store lacks /Users/eric/.local/with-staging/c4p/out/wo-store-test/pcre2/darwin_aarch64-8d2ab5e8.../pcre2.o
[pcre2-wo-build] built out/wo/pcre2.{o,wi,manifest} key b86ea3b3...
[time] pcre2-wo-install-o 0.0s
[time] pcre2-wo-install-wi 0.0s
[time] pcre2-wo-install-manifest 0.0s
survey: all targets green

and out/wo-store-test/ did not exist afterwards. wo_store_install_dir (build/wo.w:134-139) rewrites any store path under $HOME to the string "$HOME/" ++ rest for the Install target's output; whatever expands (or does not expand) that later, the three install targets ran in 0.0 s, wrote nothing to the store, and said green — a tool that stayed silent. The full with build in the same tree did create the slot, so the two paths disagree.

Expected

The install target names the real absolute path (or the expansion is verified), and an Install target whose output does not exist afterwards is a red target, not a green one.

Activity

  1. ehartford commented on Oct 25, 2026

    @ehartford
    ContributorAuthor

    Triage 2026-10-25, with v0.15.3.0 (main a261b65): does not reproduce. A $HOME/… install output is expanded and the file is created, and recreated after it is removed:

    target_new(.Install, "inst", "f.txt").output("$HOME/store/slot/f.txt").input("f.txt").arg("0644")
    $ HOME=…/fakehome with build :inst   # green
    $ find ../fakehome -type f
    ../fakehome/store/slot/f.txt
    $ mv …/f.txt …/f.moved; HOME=…/fakehome with build :inst
    $ find ../fakehome -type f
    ../fakehome/store/slot/f.moved
    ../fakehome/store/slot/f.txt
    

    The .wo install targets (build/wo.w:263) are this same .Install kind with a $HOME/… output.

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