Add reload command to pick up externally modified analysis files - #3044
Open
jozanek wants to merge 1 commit into
Open
Add reload command to pick up externally modified analysis files#3044jozanek wants to merge 1 commit into
jozanek wants to merge 1 commit into
Conversation
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.
Bloop reads each project's persisted compilation state once and keeps it in memory, so state replaced on disk — restoring a cache saved from an earlier run, say — is invisible until a restart.
Adds a way to re-read it:
bloop reload, all projects or--projectbloop/reloadAnalysis, given targets or allA reload replaces every requested project or nothing. It fails, untouched, while a project compiles or is cleaned, if state changes mid-read, or if what's on disk can't be used; BSP errors carry a stable
reasonandretryableflag. Persisted state is only adopted when the output directory it names is one Bloop manages for that project — compilation later deletes that directory, so an unvalidated path would eventually be removed recursively.workspace/reloadis implemented as configuration-only (Bloop already reloads config per request) and never imports state, so it can't fail for unrelated reasons.Closes #1091. The remaining half of that discussion — sharing state across machines or checkouts — is blocked by absolute paths in the persisted state and is tracked in #1351.
Known issue: after a reload, an earlier-started request can leave a stale latest result, affecting BSP diagnostic carry-over only — the successful result compilation builds on is authoritative.
Tests:
ReloadAnalysisSpec(12) andBspReloadSpec(3 per transport).