Fix unnecessary initial double parsing in server mode with reparse#625
Merged
sim642 merged 6 commits intointeractivefrom Mar 10, 2022
Merged
Fix unnecessary initial double parsing in server mode with reparse#625sim642 merged 6 commits intointeractivefrom
sim642 merged 6 commits intointeractivefrom
Conversation
michael-schwarz
approved these changes
Mar 9, 2022
karoliineh
approved these changes
Mar 9, 2022
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.
Closes #623.
When starting server mode without reparse, input files are parsed once at the beginning, just like for normal analysis. When starting server mode with reparse, they were similarly parsed, but when invoking the first analyze command, it repeated parsing the input files. In the latter case, the initial parsing is pointless.
To my surprise, this fixes the issue. I think the problematic statement came from that initial parse and the first reparse in the server mode somehow screws something up. There might be a deeper issue with the incrementality and reparsing in server mode, but I couldn't figure out what that would be.
Additionally this PR includes a couple of additional global data resets in server mode that I initially thought might be the cause.