Skip to content

TypeScript dist: effectful libs (hydra.lib.{effects,files,system,text}) not generated; test suite fails with 484 tsc errors #503

Description

@joshsh

Running /test all on the staging cycle surfaced a pre-existing TypeScript gap (present since #494, invisible because CI runs no TypeScript job).

Symptom: tsc --strict fails with ~484 errors when validating the generated TS dist (heads/typescript/bin/test-distribution.sh hydra-kernel).

Root cause — two related generation gaps:

  1. Effectful libs not generated for TypeScript. dist/typescript/hydra-kernel/.../hydra/lib/ is missing effects.ts, files.ts, system.ts, text.ts, while the test suite does generate test/lib/{effects,files,system}.ts that import them → TS2307: Cannot find module '../lib/effects.js' (etc.). Test generation outpaced main-lib generation for the TypeScript target.

  2. maybes vs optionals stale reference. decode/classes.ts imports ../lib/maybes.js, but the TS dist provides optionals.ts (post-Resolve maybe / optional ambiguity #401 maybe→optional rename). The generated TS decode still references the old module name.

The TS2307 unresolved-module errors cascade into the bulk of the 484 total (TS7006 implicit-any, TS2554 arity, TS2349 not-callable) because unresolved imports degrade downstream types to any under --strict.

Fix direction: extend the TypeScript target's lib emission scope to include the effectful libs (hydra.lib.{effects,files,system,text}), and fix the maybesoptionals reference in TS decode emission.

Not a regression from #498 — verified the same failure on origin/main. Tracked separately so #498 can promote on the green targets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions