Files
scriptc/tests/library-mode/contract-order/profile.json
Chris Tate 9d811bf7b5 Pin declaration-order conformance and define-or-refuse for order-ambiguous sidecar inputs
- New contract-order conformance fixture (both emissions): union arms anti-alphabetical with payload records declared in a separate file (import order never perturbs table order), an anti-alphabetical enum with a global-shadowing "Infinity" member, and a union referenced through a type alias (the table derives from the aliased declaration; the alias adds no entry and no reordering).
- Contract facts now scan the whole program graph, not just the entry: type-only modules join (they have no runtime edge, so they ride the program's source files rather than moduleOrder), non-entry modules anchor after the entry in bytewise path order, and the identity hashes cover type-only modules so contract-bearing edits always move source_hash/build_id.
- SC4010: a tabled or designated type whose members gather from multiple declaration sites (interface merging, module augmentation, a same-name exported type in another module) refuses with every site named file:line.
- SC4011: a conditional or mapped type producing a tabled/designated type refuses with its own teaching.
- Union composition (type Msg = A | B where A/B are kind-tagged unions) is allowed and pinned: arms flatten depth-first in source order, each constituent in its own declaration order, and an arm name appearing in several constituents keeps its first occurrence; a repeat among one declaration's own inline arms still refuses.
2026-07-23 17:57:09 -05:00

26 lines
595 B
JSON

{
"profile_format": 1,
"name": "conformance-contract-order",
"entry": "lib.ts",
"emission": "llvm",
"abi": {
"prefix": "ko_",
"init_symbol": "ko_init",
"sink_register_symbol": "ko_set_panic_sink",
"collect_symbol": null,
"result_reset_symbol": null
},
"exports": [
{ "export": "boot", "symbol": "ko_boot", "params": [], "returns": "f64" }
],
"sidecar": {
"wire_version": 1,
"abi_version": 1,
"snapshot_format": 1,
"build_id_symbol": "ko_build_id",
"abi_version_symbol": "ko_abi_version",
"model": "Model",
"msg": "Msg"
}
}