mirror of
https://github.com/TanStack/router.git
synced 2026-11-16 19:38:07 +00:00
refactor(compiler): delete dead and duplicated code, do less work per compile
Dead code (audit §3 and a symbol-occurrence sweep): RewriteSet.claimLive, DependencyLedger.paths, WarningLedger.reset(path), unread fields of the split decisions and route recognition, the HMR planners' second rename table (PlanContext.nameOf replaces it), CompileRequest.env.routerSplit, the `-start` alternative of ROUTER_PACKAGE_RE, the duplicated HmrStyle, import-protection's old ImportGraph/buildTrace and unread members, Rsbuild R72 remnants and copied rebuild/route-digest helpers, unused Queue and generator helpers, FunctionIdAllocator.has/get, ServerFnRegistry.tokenOf, StartEnvFacts.useClient, the duplicated provider self-accept unit. Less work per compile: the route-registry fingerprint is the route id (three canonicalJson+sha1 per compile gone); edge keys are a plain join (sha1 only for edge-module ids); the specifier segment of a substituted edge is cut at substitution instead of per edge per output at freeze (markSegment and the Tier 0 marker deleted); the units of each import are listed once per plan instead of filtered per import per output; the dependency paths of a compile are computed on demand (only the Rspack and webpack hosts read them). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
8acadc9590
commit
6e14f8610e
42 changed files with 187 additions and 623 deletions
Loading…
Add table
Add a link
Reference in a new issue