Skip to content

Make Effect diagnostics fail typecheck on TS 6 #58

Closed

Description

@allisonmahmood

Part of #54

Question

Which mechanism makes pnpm typecheck fail on an @effect/language-service diagnostic in this repo: effect-language-service patch against tsc on TypeScript 6, or @effect/tsgo (t3code's route: effect-tsgo patch in prepare, tsgo --noEmit)? Try both; keep the one that fails on a deliberate missingEffectServiceDependency; wire it into prepare and CI; promote the diagnostics t3code sets to error in tsconfig.base.json. Note which rules the chosen route lists as v3-only. AFK.

Resolution records the mechanism, the diagnostics enabled, and any TS-version caveat.

Activity

  1. added
    wayfinder:task
    on Aug 28, 2026
  2. allisonmahmood commented on Aug 28, 2026

    @allisonmahmood
    OwnerAuthor

    Resolution

    Mechanism: effect-language-service patch against the installed tsc (TypeScript 6.0.3). Both routes were tried and both fail on a deliberate Effect-only diagnostic (deterministicKeys + globalConsoleInEffect probe: unpatched tsc exit 0, patched tsc exit 2, patched tsgo exit 1). The tsc patch wins because it adds no dependencies (@effect/tsgo needs @typescript/native-preview 7.0.0-dev, per-package tsgo --noEmit scripts and t3code's backup-cleanup script). Wired as prepare: effect-language-service patch && simple-git-hooks and typecheck: effect-language-service patch && turbo run typecheck — patch is idempotent, ~5s, and check exits 0 either way so it is not usable as a guard.

    Diagnostics at error: importFromBarrel, anyUnknownInErrorContext, unsafeEffectTypeAssertion, instanceOfSchema, deterministicKeys, leakingRequirements, globalErrorInEffectCatch, globalErrorInEffectFailure, unknownInEffectCatch, preferSchemaOverJson, globalDateInEffect, globalConsoleInEffect, globalRandomInEffect, globalTimersInEffect, globalFetchInEffect, plus the language-service defaults (missingEffectContext, missingLayerContext, floatingEffect are already error). strictEffectProvide, strictBooleanExpressions off (as t3code).

    At warning (visible, not failing, via ignoreEffectWarningsInTscExitCode: true): nodeBuiltinImport, globalConsole, globalDate, globalRandom, globalTimers, globalFetch, cryptoRandomUUID. These are whole-file rules that flag plain Node code — 46 hits today in cli (24), db (14), server (6), storage (2). Each capability port ticket should promote them for its package once ported.

    Version caveats: in @effect/language-service 0.87.2 the README support table marks missingEffectServiceDependency, schemaSyncInEffect, cryptoRandomUUID, cryptoRandomUUIDInEffect as Effect v3-only (they exist but do nothing on v4 code); they stay configured so they gate the moment the v4 port ships. lazyEffect (in t3code's block) does not exist in 0.87.2 and was dropped. v4 service class is Context.Service (there is no effect/ServiceMap module in rc.112). Turbo caches typecheck by inputs, so a stale cache can replay a pass; pnpm exec turbo run typecheck --force re-runs.

    PR: #65 (stacked on #63, base chore/pin-effect-rc).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

wayfinder:task

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions