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:
parent
734ddfe2d6
commit
dedd53eb7a
2 changed files with 8 additions and 7 deletions
|
|
@ -12,9 +12,11 @@ default: accept
|
|||
|
||||
# build the self-contained executable from wo.toml: `woc <dir>` 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
|
||||
|
|
|
|||
|
|
@ -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 <dir>` 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=<repo>/runtime/wovm — the module justfile's `build` recipe does.
|
||||
|
|
|
|||
Loading…
Reference in a new issue