fwcd / fwcd/vscode-kotlin

File changes are out of sync with language server

Open
#91 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
359
Forks
56
PR merge metrics
No merged PRs in 30d

Description

### Description

1. Changes to files don't trigger a change from the language server until they are reopened.
2. Once reopened, the language server uses the previous version of the file, not the latest.

### Extension version
v0.2.24

### Additional context

Screen capture from making changes to _settings.kts_ in the [tekumara/teamcity-kotlin-example](https://github.com/tekumara/teamcity-kotlin-example) repo:

1. The change from `script` -> `script1` is not picked up until _settings.kts_ is reopened
2. Once reopened, a new change from `script1` -> `script` is made. Now the language server is showing the error as if the file still contained `script`.


![Recording 2022-03-30 at 17 17 48](https://user-images.githubusercontent.com/125105/160764330-bc90d9f3-13a7-4b59-a195-96153a322253.gif)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the language-server behavior with settings.kts in the linked teamcity-kotlin-example repository using extension v0.2.24. Trace the VS Code extension's file-change handling and language-server synchronization; done means edits trigger updates without reopening and diagnostics use the latest file contents.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin, typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.