Repository navigation
S3: yard written in Track (tools/yard) - #36
Merged
Merged
Conversation
tools/yard/*.trk builds with trackc build --native and drives trackc for per-module compiles; tests/yard/run.sh mirrors tests/yard_tests.rs without cargo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Track yard used target/objects/main.o, a standalone build of main.trk, as the executable, so a call into a module main did not import failed with 'undefined function'. yard now writes target/_yard_root.trk with one import per module and builds that one unit from the project root; trackc's cwd-relative fallback gives each module the same file key its importers use, so explicit imports load once. Per-module checks stay as cache stamps; the image is keyed by the package fingerprint. yard check builds the same image in scratch, so check and build agree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checker on S3b: a `"` in a module filename ended the import string in target/_yard_root.trk (`a";import "evil` became two imports and a parse error); the Rust yard builds such a name. Module paths are now escaped as Track string contents (`\`, `"`, newline). The runner's failing-test case used `abort()`, which is a compile error under trackc, so it passed for the wrong reason; it now aborts at run time and checks for "Track abort: zfail". New check: a module named `q"u\o.trk` links. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 41 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second step of retiring Rust. yard, the package and build tool, is ported to Track. The Rust yard in
src/yardstays until S5 deletessrc/.What
tools/yard/:main.trk(commands),builder.trk,manifest.trk,cache.trk,resolver.trk,yutil.trk. Build it withtrackc build --native tools/yard/main.trk -o yard.$TRACKCfirst, then atrackcnext to the yard binary, thenPATH..trkundersrc/is linked, except names containing_testand anything under/tests/.target/_yard_root.trk, oneimportper module, with each path escaped as Track string contents. It then builds that file into one image.yard checkbuilds the same root, socheckandbuildagree.sys_execwith single-quote escaping. No runtime primitives were added.tests/yard/run.shneeds no cargo. It has 14 cases: the 9 fromtests/yard_tests.rs, plus implicit module linking, nested and explicit imports, check/build agreement, the linked-image cache, and a CLI sweep.docs/yard.mdis updated.Differences from the Rust yard
Track.tomlsorted by name. Rust used hash-map order.target/_track_runtime.o, because the runtime is built into the image.Checks
First check: FAIL. A cross-file call with no
importbuilt under the Rust yard but not under the Track yard. Fixed in 3fa6caf.Re-check: PASS with notes. Compared against the Rust yard on:
_testandtests/files excluded from the link../imports (both fail, as they do in Rust)yard testpassing and failingShell injection through paths, names and
Track.tomlvalues was tried and executed nothing. Its two notes are fixed in bbdcdae:"in a filename could end the import string in the root file;Local gates:
tests/yard/run.sh: 14/14check --deny-warnings tools/yard/main.trkcargo test: 165 passedFollow-up: run
tests/yard/run.shin CI. This waits for #35, which also editsci.yml.🤖 Generated with Claude Code