code wiki / _hdl_build / nx_decollide.nx
nx_decollide.nx
buildroot/runtime/_hdl_build/nx_decollide.nx
about
nx_decollide.nx -- NAME-COLLISION resolver: two DIFFERENT libraries share a basename in two dirs (0
shared functions -- NOT versions of one lib; converging would delete a real module). Keep the CANONICAL
copy's name (e.g. the one that is a build target, or the majority), and rename ONLY the other copy to a
distinct semantic name + repoint ONLY the importers that resolve it. Sound + FULL-SCALE by construction:
the renamed copy keeps its exact bytes (just a new name), so lib-importers are behaviour-preserved and
their transitive dependents are provably unaffected -- only the DIRECT importers can change, so we
rebuild EVERY buildable direct importer and require byte-identical. Commit iff all match, else restore
every source + rename back (never-brick). Handles the build-target case (keep the target's name) and
third-dir importers (they resolve the kept copy -> untouched) that nx_split_resolve cannot.
argv: <lib> <keepdir> <rndir> <newname> <buildonly-elf> <direct-importer-srcpath>...
e.g. nx_decollide nx_debt runtime/_hdl_build runtime nx_debt_strategy _offc/nx_buildonly.elf <importers>
(keep the _hdl_build tool as nx_debt; rename the runtime strategy-lib to nx_debt_strategy)
exit: 0 DECOLLIDED | 1 REFUSED (all restored) | 2 usage/precondition | 3 filesystem move error
license_tier: ORIGINAL No hw writes (Rule 26): edits .nx source + rebuilds only.
dependencies 4 imports · 0 importers
imports: nx_resolve_lib.nxnx_seat_drive_lib.nxnx_seg_store.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 20 | const DC_MAXC: i64 = 256 |
functions
| 22 | func main(argc: i64, argv: *i64) -> i64 |