mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-07 08:33:50 +08:00
Structural positions started with a file's absolute path, so lowered names (closures, recursive records and unions, and every name keyed by a type that holds one) changed with the directory the program was compiled in. Union arms are ordered by their types' keys, so a program compiled in a new temporary directory could also get its union arms in another order. union-retype.test.ts compiles each program in a fresh temporary directory, and in about one run in ten the arms of the visitor's unions came out in an order where no retag keeps its tags, which failed "lowered identity retags share the box". Positions now name a file by its path relative to the entry's directory (default library files keep their base name), so the same program gets the same names wherever it sits.