fix: end "Compiling" progress when the compile request completes or the connection is lost - #8745
Draft
jozanek wants to merge 2 commits into
Draft
fix: end "Compiling" progress when the compile request completes or the connection is lost#8745jozanek wants to merge 2 commits into
jozanek wants to merge 2 commits into
Conversation
…he connection is lost
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Fixes #3464.
Problem
The "Compiling X" progress is created on BSP
build/taskStartand ended only by a matchingbuild/taskFinish. When a build server drops that notification — or dies, hangs, or is replaced mid-compile — nothing else ends it, so the indicator spins for 20–30+ minutes. The only bulk cleanup was reachable exclusively through a successful reconnect + re-import + re-index.Fix
Every "Compiling" progress now gets a terminal boundary that does not depend on the server behaving:
Compilationsends leftover progress when abuildTarget/compilereaches any terminal state, correlated byoriginIdwith a target fallback.BuildServerConnectionowns an explicitConnected → Reconnecting → Closedlifecycle, and each launcher has a dispatch gate that drops state-mutating notifications once its generation is superseded.buildTarget/run, which only answers when the process exits — its compilations are bounded by an origin-correlated idle policy, and a local run now precompiles first.Report processing stays independent of the token, so a late
build/taskFinishstill publishes diagnostics and module status. Also fixed: "Not now" on the reconnect prompt hung the connection permanently, andbuildTarget/runon run-only targets.Known limitations
Documented in code where each applies: compilations started by another BSP client are cleaned only on connection close; an origin-less request can end an overlapping same-target compilation early; task ids are compared across servers; a server emitting no task notifications loses its indicator after the idle threshold.
Follow-up
Compilation identity is keyed by target while BSP lifecycle identity is closer to
(connection generation, taskId). A per-launcher compilation tracker with generation provenance would remove the remaining inference and cancellation races — better as a separate change.