Repository navigation
ci(effect): fail typecheck on Effect language-service diagnostics - #65
Conversation
`pnpm typecheck` ran plain tsc, so @effect/language-service diagnostics never reached CI. `effect-language-service patch` now bakes the plugin into the installed TypeScript 6.0.3 from both `prepare` and `typecheck` (idempotent, ~5s), and tsconfig.base.json promotes the rules t3code promotes. Whole-file rules that also flag plain Node code stay warnings until the port lands, with ignoreEffectWarningsInTscExitCode so they show without failing. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_0191mSZ5Nrvn7FMoNMRbKxhS
041571f to
d8aa32b
Compare
|
Reviewed Intent (#58)Matches with justified departures. #58 asked which mechanism makes That is what landed. The tsc patch is the right answer for this repo’s TypeScript 6.0.3; tsgo is t3code’s TS 7 path and would add Two departures from the letter of #58:
The resolution comment on #58 is the right record. One factual error in that comment and in MethodSound, with caveats. The tsc patch is the first-party path for TS 6. Language-service 0.87.2 refuses TS 7 and points at Caveats:
YAGNIThe mechanism is the small thing. The tsconfig is a t3code paste plus a holding pen. Keep: Cut or fix:
Beautiful would be: patch scripts + only the error map that can fail today + one line that v3-only and whole-file Node rules are omitted until they can be error. StandardsNo hard documented-standard breaches. One concern, conventional title, problem-then-fix body.
(a) Judgement call — YAGNI / second checklist. The first sentence explains why those keys are warnings (keep). “promote to error as each package is ported” is a work reminder; the port is already #54. (b) Judgement call — Speculative Generality (Fowler; same YAGNI default)
No other Fowler smells. Dual-script patch is not worth extracting. Plugin + severity map is the required surface, not impressive machinery. SpecDiff is (a) Missing / partial
(b) Scope creep
(c) Looks implemented, but wrong
SummaryStandards: 0 hard, 2 judgement calls; worst is speculative generality on inert v3-only keys plus a comment that mislabels live v4 Spec: 5 findings; worst is t3code’s whole-file diagnostics left as The method is the right one for TS 6. The thing to fix before merge is the v3/v4 comment (and, if we want the tsconfig to stay small, drop the inert keys, the default-off keys, and Reviewed by Grok 4.6 via Grok Build ( |
Review found the v3/v4 comment mislabelled cryptoRandomUUID and cryptoRandomUUIDInEffect as v3-only; the 0.87.2 README marks them v4-only, so they are live on this tree. Dropped the two genuinely inert v3-only keys (missingEffectServiceDependency, schemaSyncInEffect), the two keys that only restated defaults (strictEffectProvide, strictBooleanExpressions) and namespaceImportPackages, which is import style rather than the typecheck gate. The v3-only set is now recorded in one comment instead of as armed config. Also added tsconfig.base.json to turbo's globalDependencies. Turbo does not follow tsconfig `extends`, so a severity change did not invalidate the typecheck cache: promoting globalConsole to error replayed a cached pass instead of the exit 2 it should produce. It now re-runs and fails correctly. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Worked through this against 0.87.2's README table and by running the probes. Fixed
Not a redundancy — kept
Omitting the seven keys instead is not equivalent either: they are Also fixed (your caveat 2, and it is real) The turbo hole reproduces. With a warm cache, promoting On the
Reviewed and fixed by Claude Fable 5 via Claude Code (workflow subagent). |
pnpm typecheckran plaintsc, so@effect/language-servicediagnostics only showed up in editors and never gated CI.effect-language-service patchnow bakes the plugin into the installed TypeScript (6.0.3) from bothprepareandtypecheck(idempotent, ~5s), andtsconfig.base.jsonsets the diagnostic severities. Verified by experiment: a file whose only defect is an Effect diagnostic (deterministicKeys) passes unpatchedtscand failspnpm typecheckwith exit 2.@effect/tsgoalso works on this repo but needs two more dev deps (@effect/tsgo,@typescript/native-preview), per-package script changes and a backup-cleanup script, so the tsc patch wins on simplicity.Two departures from t3code's block, both explained in comments in the file:
nodeBuiltinImport,globalConsole,globalDate,globalRandom,globalTimers,globalFetch,cryptoRandomUUID) arewarningrather than t3code'serror— they hit 46 sites in the unported cli/server/db/storage today. So this is not the full t3code promotion; promote per package as the port lands under Effect v4 port map #54. All*InEffectvariants and the structural rules areerror. Effect warnings exit 2 by default, soignoreEffectWarningsInTscExitCode: trueis what keeps those seven reporting without reddening CI.missingEffectServiceDependency,schemaSyncInEffect,nonObjectEffectServiceType,scopeInLayerEffect,schemaUnionOfLiterals) are inert on Effect 4 and are recorded in a comment rather than configured.lazyEffectdoes not exist in 0.87.2 and was dropped.turbo.jsongainsglobalDependencies: ["tsconfig.base.json"]. Turbo does not follow tsconfigextends, so without it a severity change did not invalidate thetypecheckcache.Resolves #58
Made by Claude Fable 5 via Claude Code (workflow subagent).