build: pass direct exports to package compilers
This commit is contained in:
@@ -18,8 +18,9 @@ package wwdump_test;
|
||||
// wwdump_ww's exit code is deliberately NOT gated: the diagnostics
|
||||
// land on stderr regardless, and the armed bail flips the exit code —
|
||||
// the line count is the one signal stable across the fold sequence.
|
||||
// #90 sep-feed: import-bearing fixtures feed their RESOLVED sep unit
|
||||
// (`ww build -S` composes <stem>.sepwork/__root.unit.ww); the
|
||||
// #90 sep-feed: `ww build -S` resolves import-bearing fixtures to an
|
||||
// owner unit and direct exports; this raw wwdump-only gate explicitly
|
||||
// composes those artifacts because wwdump has no package-input CLI. The
|
||||
// import-free test/wcc/901_*.ww companions stay raw-fed.
|
||||
//
|
||||
// wwdumpgate (#52, F15 c4) — the -c and -r arms gate on parse-stage
|
||||
@@ -93,11 +94,30 @@ fn countdiag(stderr: str) i32 = {
|
||||
fail(classes[i], strings.concat(rels[i],
|
||||
": no resolved sep unit (ww build -S failed)"));
|
||||
};
|
||||
src = strings.concat(stem, ".sepwork/__root.unit.ww");
|
||||
if (!testenv.exists(src)) {
|
||||
let work: str = strings.concat(stem, ".sepwork/");
|
||||
let owner: str = strings.concat(work, "__root.unit.ww");
|
||||
if (!testenv.exists(owner)) {
|
||||
fail(classes[i], strings.concat(rels[i],
|
||||
": __root.unit.ww missing after ww build -S"));
|
||||
};
|
||||
let deps: []str = [];
|
||||
if (i == 0) { append(deps, "math.checked"); append(deps, "types"); };
|
||||
if (i == 1) {
|
||||
append(deps, "ascii"); append(deps, "os"); append(deps, "strconv");
|
||||
};
|
||||
if (i == 3) { append(deps, "fnmatch"); };
|
||||
if (i == 4) { append(deps, "math.random"); append(deps, "test"); };
|
||||
let composed: str = "";
|
||||
let di: i32 = 0;
|
||||
for (di < deps.len) {
|
||||
composed = strings.concat(composed, "//ww:module ", deps[di],
|
||||
"\n", testenv.readfile(strings.concat(work, deps[di],
|
||||
".wwi")), "\n");
|
||||
di += 1;
|
||||
};
|
||||
composed = strings.concat(composed, testenv.readfile(owner));
|
||||
src = strings.concat(td, "/wwdump.raw.ww");
|
||||
testenv.writefile(src, composed);
|
||||
};
|
||||
let co: testenv.commandout;
|
||||
let av: []str = [testenv.driver("wwdump_ww"), "-c", src];
|
||||
|
||||
Reference in New Issue
Block a user