ReviewOS

home-lang/home

Fix false TS2308 collisions across export-star barrels

#417
Closed chris opened this 24 days ago · 1 comment
24 days ago

Summary

A valid barrel that uses export star across modules with uniquely named top-level exports produces false TS2308 diagnostics in Home. tsc 7.0.2 and tsgo 7.0.0-dev.20260707.2 accept the same graph silently.

Minimal shape

Each leaf exports unique declarations such as Item0/create0, Item1/create1, and so on. A barrel contains:

export * from "./leaf-0000";
export * from "./leaf-0001";
export * from "./leaf-0002";

Home reports TS2308 on the third line even though no exported names collide.

Reproduction

The deterministic generated case is being added under bench/vs_tsgo/corpus/reexport_graph by the TypeScript performance tracker #416. Run the corpus generator and invoke home-tsc with --noEmit against that project.

Expected

No diagnostic when star-exported modules have disjoint top-level export names. TS2308 should be emitted only for an actual ambiguous projected export.

Acceptance

  • The unchanged 64-leaf/eight-barrel benchmark validates silently in Home, tsc, and tsgo
  • Existing export-star collision tests still pass
  • A focused regression test covers disjoint star exports
  • Fixing correctness enables the fair benchmark; no workload workaround

Related: #416

24 days ago

Fixed on main by a7fa412.

Verified with:

  • focused disjoint/overlap/explicit-resolution/same-module checker tests
  • full ts_checker and ts_program suites
  • ReleaseFast home-tsc build
  • the unchanged 64-leaf/8-barrel corpus validating silently
  • an injected real collision producing the same two TS2308 diagnostics as tsc

Sign in to comment on this issue.