fix(log-watcher): portable wo.toml — no pinned runtime path

The manifest pinned `[build] runtime = "../../../runtime/wovm"`, a repo-only
relative path that overrides woc's runtime resolution — so `woc <copied-dir>`
failed off-repo (e.g. an installed toolchain on a test server) with "runtime
binary not found".

- Drop the [build] section: the project no longer hardcodes a machine path, so
  an installed `woc` self-locates `wovm` beside its own binary.
- The module justfile's `build` recipe now sets WO_RUNTIME=<repo>/runtime/wovm
  so the in-repo build still uses the freshly built VM.
- Acceptance is unaffected (it compiles via `woc --emit` + an explicit $WOVM,
  never the manifest [build] key).

Verified: just log-watcher::build OK; just log-watcher 7/0; and building a
copied tree with the installed-layout woc from an unrelated cwd self-locates
the sibling wovm and produces a runnable binary.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
shoney.arickathil 2026-08-18 01:07:05 +02:00
parent f0971e1481
commit 464b61ba65
2 changed files with 8 additions and 7 deletions

View file

@ -12,9 +12,11 @@ default: accept
# build the self-contained executable from wo.toml: `woc <dir>` reads the # build the self-contained executable from wo.toml: `woc <dir>` reads the
# manifest and produces target/log-watcher (needs the compiler and runtime # manifest and produces target/log-watcher (needs the compiler and runtime
# built once: `just woc-build` and `just wovm-build` at the root) # built once: `just woc-build` and `just wovm-build` at the root). WO_RUNTIME
# points woc at the repo's freshly built VM — the manifest pins no path, so an
# installed woc self-locates its own wovm instead.
build: build:
{{ROOT}}/compiler/_build/default/bin/woc . WO_RUNTIME={{ROOT}}/runtime/wovm {{ROOT}}/compiler/_build/default/bin/woc .
@ls -la target/log-watcher @ls -la target/log-watcher
# the language track's acceptance test: this sample must compile with zero # the language track's acceptance test: this sample must compile with zero

View file

@ -10,8 +10,7 @@ description = "The Haxe log-watcher ported file-for-file: the systems-track samp
[runtime] [runtime]
wo = ">= 0.1" wo = ">= 0.1"
# `woc .` in this directory (or `woc docs/examples/log-watcher` from the # `woc <dir>` builds target/log-watcher from this manifest. No runtime path is
# repo root) builds target/log-watcher from this manifest. Paths resolve # pinned here so the project is portable: an installed `woc` finds `wovm` beside
# against this file's directory. # its own binary. For an in-repo build, point woc at the freshly built VM with
[build] # WO_RUNTIME=<repo>/runtime/wovm — the module justfile's `build` recipe does.
runtime = "../../../runtime/wovm"