Repository navigation
fix(runEffectInsideEffect): report Effect.runSyncExit and Effect.runPromiseExit - #876
Merged
Merged
Conversation
…mples Ports runEffectInsideEffect_exit.ts (v3, v4) and runEffectInsideEffect_existingContext.ts (v4) from Effect-TS/language-service#781. The baselines record current behavior: Effect.runSyncExit and Effect.runPromiseExit are not reported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…romiseExit The Exit runners start a separate fiber just like runSync and runPromise, but the rule only matched four runner names. Port of Effect-TS/language-service#781. Fixes #873 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Effect perf vs stock tsgo: no significant change Details
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Effect.runSyncExitandEffect.runPromiseExitstart a separate fiber, just likeEffect.runSyncandEffect.runPromise.runEffectInsideEffectmatched only four runner names, so the Exit forms were never reported. This ports the matching fix from Effect-TS/language-service#781.The quick fix rewrites the call to
Effect.runPromiseExitWith(effectContext)(child)in v4 and toRuntime.runPromiseExit(effectRuntime, child)in v3.What changed
runEffectApisnow includesrunSyncExitandrunPromiseExit.contextbinding in v4.Scope
Effect.contextinstead ofEffect.services, was already in tsgo. The new existing-context fixture confirms it.// @effect-v3. 59 of 223 v3 fixtures lack that line, so their quick-fix baselines probably run against v4. The new v3 fixture has the line.Verification
pnpm lint,pnpm check, andpnpm testpass.Fixes #873
🤖 Generated with Claude Code