@githolon/dsl 0.87.0 → 0.88.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/compile_package_main.ts +24 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@githolon/dsl",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.88.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Nomos 2 domain-authoring DSL: aggregates + directives in TS, executed and encoded to the Rust kernel's wire shapes.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -1016,7 +1016,7 @@ const NOMOS_TYPES_DEP = "^0.4.1";
|
|
|
1016
1016
|
// 0.48.x: session-bound clients (XClient.bind/NomosClientInterface/DomainClientSessionMismatch/
|
|
1017
1017
|
// DomainNotInstalledForSession, engine.follow, pendingConflicts lanes) — the generated client
|
|
1018
1018
|
// REQUIRES this surface. 0.48.1 fixes NomosSession.watchPendingConflicts delegation.
|
|
1019
|
-
const NOMOS_CLIENT_DEP = "^0.
|
|
1019
|
+
const NOMOS_CLIENT_DEP = "^0.56.0";
|
|
1020
1020
|
// DRIFT TRIPWIRE: pubspec_pins.test.ts asserts these equal the CURRENT versions in dsl/dart/pubspec.yaml
|
|
1021
1021
|
// and dsl/dart_types/pubspec.yaml — a Dart release without this bump fails the suite, so tenants never
|
|
1022
1022
|
// land back in dependency_overrides (the exact co2 report this closes, third occurrence).
|
|
@@ -2676,6 +2676,29 @@ async function main(): Promise<void> {
|
|
|
2676
2676
|
typeof dartCfg === "object" && dartCfg.barrel !== undefined ? dartCfg.barrel : defaultBarrel;
|
|
2677
2677
|
dartFiles = emitDart(domainModules, dartOut, domainHash, packageInterface, dartSupportImport, dartBarrel, nomosCompat, dartNames);
|
|
2678
2678
|
}
|
|
2679
|
+
// COMPILE-VALID MUST MEAN COMPILABLE (co2): `githolon compile` reported success while the generated Dart
|
|
2680
|
+
// had hard compiler errors (a duplicate id symbol, missing contract-id defs). Run `dart analyze` over the
|
|
2681
|
+
// emitted Dart as a SYMBOL-RESOLUTION GATE — a real analysis ERROR fails the compile (with the analyzer's
|
|
2682
|
+
// own output), so a broken package never passes `mountable ✓`. Best-effort: skipped (with a note, never a
|
|
2683
|
+
// false red) when `dart` is absent or the package's deps aren't resolved yet (needs `pub get`). Opt out
|
|
2684
|
+
// with NOMOS_SKIP_DART_ANALYZE=1.
|
|
2685
|
+
if (dartOut !== undefined && process.env.NOMOS_SKIP_DART_ANALYZE !== "1") {
|
|
2686
|
+
try {
|
|
2687
|
+
execFileSync("dart", ["analyze", "--no-fatal-warnings", dartOut], { stdio: "pipe", encoding: "utf8" });
|
|
2688
|
+
console.log(` dart ✓ generated Dart analyzes clean (compile-valid ⇒ compilable)`);
|
|
2689
|
+
} catch (e) {
|
|
2690
|
+
const err = e as { status?: number; stdout?: string; stderr?: string; code?: string };
|
|
2691
|
+
const out = `${err.stdout ?? ""}${err.stderr ?? ""}`;
|
|
2692
|
+
if (err.code === "ENOENT") {
|
|
2693
|
+
console.log(` dart — analyze skipped (dart not on PATH); the generated Dart is UNVERIFIED`);
|
|
2694
|
+
} else if (/isn't a package dependency|Target of URI doesn't exist: 'package:|run .?(dart |flutter )?pub get|No pubspec\.yaml/i.test(out) && !/\berror •/.test(out)) {
|
|
2695
|
+
// Deps not resolved (pub get not run) rather than a codegen bug — skip, don't false-fail.
|
|
2696
|
+
console.log(` dart — analyze skipped (package deps not resolved — run \`dart pub get\` in ${path.relative(process.cwd(), dartOut)}); the generated Dart is UNVERIFIED`);
|
|
2697
|
+
} else {
|
|
2698
|
+
fail(`the generated Dart package does NOT compile — \`dart analyze\` found errors (compile-valid must mean compilable). Fix the law/codegen or set NOMOS_SKIP_DART_ANALYZE=1 to emit anyway:\n${out.trim()}`);
|
|
2699
|
+
}
|
|
2700
|
+
}
|
|
2701
|
+
}
|
|
2679
2702
|
}
|
|
2680
2703
|
|
|
2681
2704
|
// ── summary ──
|