From dedd53eb7a1af145dd4b5191234ee1a982d59104 Mon Sep 17 00:00:00 2001 From: "shoney.arickathil" Date: Tue, 18 Aug 2026 01:07:05 +0200 Subject: [PATCH] =?UTF-8?q?fix(log-watcher):=20portable=20wo.toml=20?= =?UTF-8?q?=E2=80=94=20no=20pinned=20runtime=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The manifest pinned `[build] runtime = "../../../runtime/wovm"`, a repo-only relative path that overrides woc's runtime resolution — so `woc ` 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=/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) --- docs/examples/log-watcher/justfile | 6 ++++-- docs/examples/log-watcher/wo.toml | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/examples/log-watcher/justfile b/docs/examples/log-watcher/justfile index db4e570..a8ad12f 100644 --- a/docs/examples/log-watcher/justfile +++ b/docs/examples/log-watcher/justfile @@ -12,9 +12,11 @@ default: accept # build the self-contained executable from wo.toml: `woc ` reads the # 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: - {{ROOT}}/compiler/_build/default/bin/woc . + WO_RUNTIME={{ROOT}}/runtime/wovm {{ROOT}}/compiler/_build/default/bin/woc . @ls -la target/log-watcher # the language track's acceptance test: this sample must compile with zero diff --git a/docs/examples/log-watcher/wo.toml b/docs/examples/log-watcher/wo.toml index 6e9e4cf..01fec06 100644 --- a/docs/examples/log-watcher/wo.toml +++ b/docs/examples/log-watcher/wo.toml @@ -10,8 +10,7 @@ description = "The Haxe log-watcher ported file-for-file: the systems-track samp [runtime] wo = ">= 0.1" -# `woc .` in this directory (or `woc docs/examples/log-watcher` from the -# repo root) builds target/log-watcher from this manifest. Paths resolve -# against this file's directory. -[build] -runtime = "../../../runtime/wovm" +# `woc ` builds target/log-watcher from this manifest. No runtime path is +# pinned here so the project is portable: an installed `woc` finds `wovm` beside +# its own binary. For an in-repo build, point woc at the freshly built VM with +# WO_RUNTIME=/runtime/wovm — the module justfile's `build` recipe does.