qt-qml: Fix qmlls updating problem with multiple instances - #532
Merged
OrkunTokdemir merged 3 commits intoAug 5, 2026
Merged
Conversation
benchoq
previously approved these changes
Jul 24, 2026
OrkunTokdemir
force-pushed
the
orkun_qmlls_improve_23_07_2026
branch
3 times, most recently
from
July 29, 2026 15:25
2932d64 to
a332a88
Compare
Many VS Code windows share the same qmlls installation. Before this change, they could break each other. Two windows could download to the same temp file at the same time. An update could overwrite a qmlls binary that was still running. The language server was also stopped during the whole download. Now every version gets its own directory. A new version is unpacked into a temp directory first. Then it is moved into place with one atomic rename. If two windows install the same version, the second one simply uses the files from the first one. The file current.json points to the current version. It is always written atomically. The exe path is read fresh from it on every start. A release tag alone does not identify a build: new builds can be re-uploaded under the same tag. So the asset upload time (created_at) is part of a version's identity. A re-uploaded build gets its own directory, current.json stores the upload time, and the update check and the manifest watcher compare it too. A migrated release.json keeps its recorded upload time; without one, the install counts as outdated and is re-downloaded once. Old versions are deleted on a best-effort basis. If a directory cannot be deleted (for example a running exe on Windows), it is skipped and deleted later. The old files/ + release.json layout is converted in place, without a new download. Other windows watch current.json. When a new version appears, they restart their language server silently. The server also keeps running during the download now. It only restarts after the new version is ready. Because nothing is overwritten anymore, the old ETXTBSY workaround was removed.
A busy qmlls often needs more than 2 seconds to answer the shutdown request. The default stop timeout of vscode-languageclient is 2 seconds. Because of this, restarts after an update often showed the error "Stopping the server timed out". Raise the timeout to 5 seconds. Also log this case as a warning, not an error. The client kills the server after the timeout anyway, so the restart still works.
unzip() resolved once yauzl finished reading zip entries, but did not wait for the corresponding destination write streams to flush to disk. The last file(s) extracted (e.g. qmlls.exe) could still be mid-write when the caller immediately tried to chmod/spawn it, causing spurious "not runnable" failures during install.
OrkunTokdemir
force-pushed
the
orkun_qmlls_improve_23_07_2026
branch
from
August 3, 2026 14:28
a332a88 to
1e12e79
Compare
benchoq
approved these changes
Aug 5, 2026
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.
Description
Give qmlls more time to stop
A busy qmlls often needs more than 2 seconds to answer the shutdown
request. The default stop timeout of vscode-languageclient is 2
seconds. Because of this, restarts after an update often showed the
error "Stopping the server timed out". Raise the timeout to 5 seconds.
Also log this case as a warning, not an error. The client kills the
server after the timeout anyway, so the restart still works.
Install each qmlls version into its own directory
Many VS Code windows share the same qmlls installation. Before this
change, they could break each other. Two windows could download to the
same temp file at the same time. An update could overwrite a qmlls
binary that was still running. The language server was also stopped
during the whole download.
Now every version gets its own directory. A new version is unpacked
into a temp directory first. Then it is moved into place with one
atomic rename. If two windows install the same version, the second one
simply uses the files from the first one. The file current.json points
to the current version. It is always written atomically. The exe path
is read fresh from it on every start.
Old versions are deleted on a best-effort basis. If a directory cannot
be deleted (for example a running exe on Windows), it is skipped and
deleted later. The old files/ + release.json layout is converted in
place, without a new download.
Other windows watch current.json. When a new version appears, they
restart their language server silently. The server also keeps running
during the download now. It only restarts after the new version is
ready. Because nothing is overwritten anymore, the old ETXTBSY
workaround was removed.
Related issue
VSCODEEXT-279
Type of change