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.
The Problem
I've experienced odd behaviour when changing RPG source in that the linter would suddenly display a "Variable name casing does not match definition" warning at various points within the source I was editing. Although this appears to be a linter issue it goes further, the tokens appear to lose their offset within the source so when you use something like F2 to rename a symbol it loses track of where those symbols are and renames the wrong text in the source.
/includefiles - I do use a lot of/includefiles.I was able to pull together a very simple example that replicates the problem, which I've also created a video that demonstrates the problem as it's not easy to understand from the description.
rm82test-2025-10-30_20.45.00.mp4
Full disclosure I leaned on Claude Code to help fix the problem and produce the documentation of the changes.
The extension was experiencing race condition offset issues that manifested as false linter errors during live editing:
The Solution
The fix implements a comprehensive debouncing and synchronization mechanism with multiple layers of protection:
Debouncing (server.ts:326-386)
Parse State Tracking (lines 327-333)
Parse ID Validation (lines 351-353, 378)
Concurrent Parse Prevention (lines 359-362)
Error Handling (lines 381-384)
Minor Cleanup
Technical Flow
Key Improvements Over Initial Version
The uncommitted changes add several critical improvements beyond the basic debouncing:
TODO
/includefiles are loaded a lot, the extension seems to reload the same file many, many times. I connect over VPN for a lot of my clients and loading source can take a while./includefiles, if they've changed/includestooChecklist
console.logs I added