diff --git a/.changeset/diagnostics-related-information.md b/.changeset/diagnostics-related-information.md deleted file mode 100644 index 6fc95f57..00000000 --- a/.changeset/diagnostics-related-information.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -"@effect/tsgo": patch ---- - -`effect-tsgo diagnostics` now reports a diagnostic's related locations. They used to be dropped in every format, so `missingEffectContext` never showed which layer could provide the missing service and `apiStabilityLeak` never showed where the unstable declaration lives. - -With `--format json`, each diagnostic that has related locations gets a `relatedInformation` array. Each entry has the same location fields as the diagnostic, plus its own `code` and `message`. Diagnostics without related locations are unchanged. - -```json -{ - "line": 23, - "column": 3, - "code": 377004, - "name": "missingEffectContext", - "message": "This Effect requires a service that is missing from the expected Effect context: `Db | Fs`.", - "relatedInformation": [ - { - "file": ".../src/index.ts", - "start": 662, - "length": 14, - "line": 22, - "column": 3, - "endLine": 22, - "endColumn": 17, - "code": 377059, - "message": "Adjusting this layer composition could provide the missing service." - } - ] -} -``` - -With `--format pretty`, the related locations are printed under the diagnostic, each with its own code snippet, as `tsc --pretty` does: - -``` -src/index.ts:23:3 - error effect(missingEffectContext): This Effect requires a service that is missing from the expected Effect context: `Db | Fs`. - -23 Effect.runPromise - ~~~~~~~~~~~~~~~~~ - - src/index.ts:22:3 - Adjusting this layer composition could provide the missing service. - 22 Effect.provide(live), - ~~~~~~~~~~~~~~ -``` - -The `~` markers in pretty output are also aligned again on lines 10 and above. They used to sit one column to the left of the code. diff --git a/.changeset/global-date-gate-by-kind.md b/.changeset/global-date-gate-by-kind.md deleted file mode 100644 index b2b9ce17..00000000 --- a/.changeset/global-date-gate-by-kind.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@effect/tsgo": patch ---- - -Make `globalDate` and `globalDateInEffect` do less work per file. Their shared walker used to look up the Effect context flags of every node it visited, although only call expressions (`Date.now()`) and `new` expressions (`new Date()`) can produce a diagnostic. It now looks up the flags only on those two node kinds, like `globalFetch`, `globalConsole`, `globalTimers`, `globalRandom` and `cryptoRandomUUID` already do. - -Reported diagnostics are unchanged. diff --git a/.changeset/reuse-api-stability-session.md b/.changeset/reuse-api-stability-session.md deleted file mode 100644 index adb4f683..00000000 --- a/.changeset/reuse-api-stability-session.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@effect/tsgo": patch ---- - -Speed up `apiStabilityLeak` by reusing one stability analysis per file. - -The rule used to allocate a fresh analysis, with its maps and work queues, for every export of a file. It now keeps one analysis per file and resets it before each export. The reset analysis behaves exactly like a fresh one, so the reported diagnostics are unchanged. A published surface that a later export reads from the shared cache is no longer queued for publication again, and a published surface without retained findings no longer allocates a findings map. - -On `packages/effect` of effect 4.0.5 with every rule enabled, the rule allocates 252 MB → 140 MB. diff --git a/.changeset/typeparser-node-store-churn.md b/.changeset/typeparser-node-store-churn.md deleted file mode 100644 index aa58d901..00000000 --- a/.changeset/typeparser-node-store-churn.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@effect/tsgo": patch ---- - -Make the Effect diagnostics write less to the checker's per-node caches. Rules run on the checker goroutine right after each file is checked, and on the Effect monorepo most of their cost was cache traffic (map misses, nil inserts, map growth) and the garbage collection it caused, not type computation. - -- Reference checks such as "is this node `Effect.gen`?" no longer probe or fill the symbol cache for statements, blocks, clauses and tokens, which can never resolve to a symbol. -- The analysis that tracks whether code runs inside `Effect.gen`, `Effect.fn` or an Effect thunk stores an entry only where the answer changes, about 2% of nodes, instead of two entries for every node of every file. -- Type lookups reject nodes that can never have a type before touching the cache, the strict Effect type check caches only types named `Effect`, and whether a file has been checked is asked once per file instead of on every query. - -Reported diagnostics are unchanged. diff --git a/README.md b/README.md index 956a7935..0c397369 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ When running in dedicated diagnostics mode, the Effect diagnostics can be emitte ## Supported Package Versions -The following target package versions are supported by `@effect/tsgo@0.53.2`: +The following target package versions are supported by `@effect/tsgo@0.53.3`: | Component | Supported versions | |---|---| diff --git a/_packages/tsgo-darwin-arm64/CHANGELOG.md b/_packages/tsgo-darwin-arm64/CHANGELOG.md index b0b5b334..cdd2d57b 100644 --- a/_packages/tsgo-darwin-arm64/CHANGELOG.md +++ b/_packages/tsgo-darwin-arm64/CHANGELOG.md @@ -1,5 +1,7 @@ # @effect/tsgo-darwin-arm64 +## 0.53.3 + ## 0.53.2 ## 0.53.1 diff --git a/_packages/tsgo-darwin-arm64/package.json b/_packages/tsgo-darwin-arm64/package.json index 0ab8dfba..5b12715a 100644 --- a/_packages/tsgo-darwin-arm64/package.json +++ b/_packages/tsgo-darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@effect/tsgo-darwin-arm64", - "version": "0.53.2", + "version": "0.53.3", "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.", "license": "MIT", "repository": { diff --git a/_packages/tsgo-darwin-x64/CHANGELOG.md b/_packages/tsgo-darwin-x64/CHANGELOG.md index ebf0e8fd..13c22fed 100644 --- a/_packages/tsgo-darwin-x64/CHANGELOG.md +++ b/_packages/tsgo-darwin-x64/CHANGELOG.md @@ -1,5 +1,7 @@ # @effect/tsgo-darwin-x64 +## 0.53.3 + ## 0.53.2 ## 0.53.1 diff --git a/_packages/tsgo-darwin-x64/package.json b/_packages/tsgo-darwin-x64/package.json index f9a55df8..eb16e650 100644 --- a/_packages/tsgo-darwin-x64/package.json +++ b/_packages/tsgo-darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@effect/tsgo-darwin-x64", - "version": "0.53.2", + "version": "0.53.3", "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.", "license": "MIT", "repository": { diff --git a/_packages/tsgo-linux-arm/CHANGELOG.md b/_packages/tsgo-linux-arm/CHANGELOG.md index 46baba07..63ea17d3 100644 --- a/_packages/tsgo-linux-arm/CHANGELOG.md +++ b/_packages/tsgo-linux-arm/CHANGELOG.md @@ -1,5 +1,7 @@ # @effect/tsgo-linux-arm +## 0.53.3 + ## 0.53.2 ## 0.53.1 diff --git a/_packages/tsgo-linux-arm/package.json b/_packages/tsgo-linux-arm/package.json index 928308f7..e482ad65 100644 --- a/_packages/tsgo-linux-arm/package.json +++ b/_packages/tsgo-linux-arm/package.json @@ -1,6 +1,6 @@ { "name": "@effect/tsgo-linux-arm", - "version": "0.53.2", + "version": "0.53.3", "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.", "license": "MIT", "repository": { diff --git a/_packages/tsgo-linux-arm64/CHANGELOG.md b/_packages/tsgo-linux-arm64/CHANGELOG.md index ecaa8718..2f146c01 100644 --- a/_packages/tsgo-linux-arm64/CHANGELOG.md +++ b/_packages/tsgo-linux-arm64/CHANGELOG.md @@ -1,5 +1,7 @@ # @effect/tsgo-linux-arm64 +## 0.53.3 + ## 0.53.2 ## 0.53.1 diff --git a/_packages/tsgo-linux-arm64/package.json b/_packages/tsgo-linux-arm64/package.json index aaa55d86..5f4245da 100644 --- a/_packages/tsgo-linux-arm64/package.json +++ b/_packages/tsgo-linux-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@effect/tsgo-linux-arm64", - "version": "0.53.2", + "version": "0.53.3", "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.", "license": "MIT", "repository": { diff --git a/_packages/tsgo-linux-x64/CHANGELOG.md b/_packages/tsgo-linux-x64/CHANGELOG.md index ee8fca01..77c51c92 100644 --- a/_packages/tsgo-linux-x64/CHANGELOG.md +++ b/_packages/tsgo-linux-x64/CHANGELOG.md @@ -1,5 +1,7 @@ # @effect/tsgo-linux-x64 +## 0.53.3 + ## 0.53.2 ## 0.53.1 diff --git a/_packages/tsgo-linux-x64/package.json b/_packages/tsgo-linux-x64/package.json index c1cefb11..7d6d515e 100644 --- a/_packages/tsgo-linux-x64/package.json +++ b/_packages/tsgo-linux-x64/package.json @@ -1,6 +1,6 @@ { "name": "@effect/tsgo-linux-x64", - "version": "0.53.2", + "version": "0.53.3", "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.", "license": "MIT", "repository": { diff --git a/_packages/tsgo-win32-arm64/CHANGELOG.md b/_packages/tsgo-win32-arm64/CHANGELOG.md index 71d23dac..44f891e5 100644 --- a/_packages/tsgo-win32-arm64/CHANGELOG.md +++ b/_packages/tsgo-win32-arm64/CHANGELOG.md @@ -1,5 +1,7 @@ # @effect/tsgo-win32-arm64 +## 0.53.3 + ## 0.53.2 ## 0.53.1 diff --git a/_packages/tsgo-win32-arm64/package.json b/_packages/tsgo-win32-arm64/package.json index b8b6a7cf..5fe6ef6c 100644 --- a/_packages/tsgo-win32-arm64/package.json +++ b/_packages/tsgo-win32-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@effect/tsgo-win32-arm64", - "version": "0.53.2", + "version": "0.53.3", "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.", "license": "MIT", "repository": { diff --git a/_packages/tsgo-win32-x64/CHANGELOG.md b/_packages/tsgo-win32-x64/CHANGELOG.md index 4ec613f7..8e13d036 100644 --- a/_packages/tsgo-win32-x64/CHANGELOG.md +++ b/_packages/tsgo-win32-x64/CHANGELOG.md @@ -1,5 +1,7 @@ # @effect/tsgo-win32-x64 +## 0.53.3 + ## 0.53.2 ## 0.53.1 diff --git a/_packages/tsgo-win32-x64/package.json b/_packages/tsgo-win32-x64/package.json index ab4c22a4..08cdf75b 100644 --- a/_packages/tsgo-win32-x64/package.json +++ b/_packages/tsgo-win32-x64/package.json @@ -1,6 +1,6 @@ { "name": "@effect/tsgo-win32-x64", - "version": "0.53.2", + "version": "0.53.3", "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.", "license": "MIT", "repository": { diff --git a/_packages/tsgo/CHANGELOG.md b/_packages/tsgo/CHANGELOG.md index 84812bfc..d04e25bd 100644 --- a/_packages/tsgo/CHANGELOG.md +++ b/_packages/tsgo/CHANGELOG.md @@ -1,5 +1,66 @@ # @effect/tsgo +## 0.53.3 + +### Patch Changes + +- 1ab5264: `effect-tsgo diagnostics` now reports a diagnostic's related locations. They used to be dropped in every format, so `missingEffectContext` never showed which layer could provide the missing service and `apiStabilityLeak` never showed where the unstable declaration lives. + + With `--format json`, each diagnostic that has related locations gets a `relatedInformation` array. Each entry has the same location fields as the diagnostic, plus its own `code` and `message`. Diagnostics without related locations are unchanged. + + ```json + { + "line": 23, + "column": 3, + "code": 377004, + "name": "missingEffectContext", + "message": "This Effect requires a service that is missing from the expected Effect context: `Db | Fs`.", + "relatedInformation": [ + { + "file": ".../src/index.ts", + "start": 662, + "length": 14, + "line": 22, + "column": 3, + "endLine": 22, + "endColumn": 17, + "code": 377059, + "message": "Adjusting this layer composition could provide the missing service." + } + ] + } + ``` + + With `--format pretty`, the related locations are printed under the diagnostic, each with its own code snippet, as `tsc --pretty` does: + + ``` + src/index.ts:23:3 - error effect(missingEffectContext): This Effect requires a service that is missing from the expected Effect context: `Db | Fs`. + + 23 Effect.runPromise + ~~~~~~~~~~~~~~~~~ + + src/index.ts:22:3 - Adjusting this layer composition could provide the missing service. + 22 Effect.provide(live), + ~~~~~~~~~~~~~~ + ``` + + The `~` markers in pretty output are also aligned again on lines 10 and above. They used to sit one column to the left of the code. +- 4672ba1: Make `globalDate` and `globalDateInEffect` do less work per file. Their shared walker used to look up the Effect context flags of every node it visited, although only call expressions (`Date.now()`) and `new` expressions (`new Date()`) can produce a diagnostic. It now looks up the flags only on those two node kinds, like `globalFetch`, `globalConsole`, `globalTimers`, `globalRandom` and `cryptoRandomUUID` already do. + + Reported diagnostics are unchanged. +- b5df4e9: Speed up `apiStabilityLeak` by reusing one stability analysis per file. + + The rule used to allocate a fresh analysis, with its maps and work queues, for every export of a file. It now keeps one analysis per file and resets it before each export. The reset analysis behaves exactly like a fresh one, so the reported diagnostics are unchanged. A published surface that a later export reads from the shared cache is no longer queued for publication again, and a published surface without retained findings no longer allocates a findings map. + + On `packages/effect` of effect 4.0.5 with every rule enabled, the rule allocates 252 MB → 140 MB. +- d3b53a7: Make the Effect diagnostics write less to the checker's per-node caches. Rules run on the checker goroutine right after each file is checked, and on the Effect monorepo most of their cost was cache traffic (map misses, nil inserts, map growth) and the garbage collection it caused, not type computation. + + - Reference checks such as "is this node `Effect.gen`?" no longer probe or fill the symbol cache for statements, blocks, clauses and tokens, which can never resolve to a symbol. + - The analysis that tracks whether code runs inside `Effect.gen`, `Effect.fn` or an Effect thunk stores an entry only where the answer changes, about 2% of nodes, instead of two entries for every node of every file. + - Type lookups reject nodes that can never have a type before touching the cache, the strict Effect type check caches only types named `Effect`, and whether a file has been checked is asked once per file instead of on every query. + + Reported diagnostics are unchanged. + ## 0.53.2 ### Patch Changes diff --git a/_packages/tsgo/package.json b/_packages/tsgo/package.json index a0bba09d..2d9b4592 100644 --- a/_packages/tsgo/package.json +++ b/_packages/tsgo/package.json @@ -1,6 +1,6 @@ { "name": "@effect/tsgo", - "version": "0.53.2", + "version": "0.53.3", "type": "module", "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.", "license": "MIT", diff --git a/etscore/version_generated.go b/etscore/version_generated.go index a9274318..c1cd9225 100644 --- a/etscore/version_generated.go +++ b/etscore/version_generated.go @@ -2,4 +2,4 @@ package etscore -const EffectVersion = "0.53.2" +const EffectVersion = "0.53.3"