Skip to content

Skip Effect diagnostics for external libraries#177

Merged
mattiamanzati merged 2 commits into
Effect-TS:mainfrom
xesrevinu:fix-skip-effect-diagnostics-external-libraries
Apr 29, 2026
Merged

Skip Effect diagnostics for external libraries#177
mattiamanzati merged 2 commits into
Effect-TS:mainfrom
xesrevinu:fix-skip-effect-diagnostics-external-libraries

Conversation

@xesrevinu

Copy link
Copy Markdown
Contributor

Fixes #174.

Effect diagnostics were still running on source files resolved from external libraries, including packages such as @cloudflare/workers-types that expose .ts entrypoints. This can surface diagnostics from node_modules and appears to trigger the reported TS2589 path.

This uses TypeScript-Go's Program.IsSourceFileFromExternalLibrary check in the Effect checker hook and skips those files before collecting Effect diagnostics.

Validation:

  • nix shell nixpkgs#go_1_26 -c go test ./typescript-go/internal/ls/autoimport ./etscheckerhooks -count=1
  • nix build .#tsgo --print-build-logs
  • verified the rebuilt tsgo no longer reports Effect diagnostics from @cloudflare/workers-types/index.ts in the cms project

@xesrevinu xesrevinu force-pushed the fix-skip-effect-diagnostics-external-libraries branch from 78bb718 to aa5a1c8 Compare April 29, 2026 09:21
@xesrevinu xesrevinu force-pushed the fix-skip-effect-diagnostics-external-libraries branch from ed2d32b to 92df01f Compare April 29, 2026 11:29
@mattiamanzati mattiamanzati merged commit f1c940b into Effect-TS:main Apr 29, 2026
5 checks passed
@mattiamanzati

Copy link
Copy Markdown
Contributor

Thanks for your PR!

@danieljvdm

Copy link
Copy Markdown

thanks @xesrevinu !

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

effectInFailure: plugin-only TS2589 from a bare import "@cloudflare/workers-types"

3 participants