Skip to content

fix: stage flix.jar download to avoid Windows file locking#535

Merged
magnus-madsen merged 2 commits into
masterfrom
fix/windows-flix-jar-file-locking
Mar 26, 2026
Merged

fix: stage flix.jar download to avoid Windows file locking#535
magnus-madsen merged 2 commits into
masterfrom
fix/windows-flix-jar-file-locking

Conversation

@magnus-madsen
Copy link
Copy Markdown
Member

@magnus-madsen magnus-madsen commented Mar 26, 2026

Summary

Fixes #534.

  • On Windows the JVM holds a file lock on flix.jar, so replacing it mid-session fails with a file-locking error.
  • Updates are now downloaded to flix.jar.new instead, and the user is prompted to reload the window.
  • On the next startup (before the JVM launches), flix.jar.new is renamed to flix.jar.
  • The changelog display is deferred to after the rename so it is not lost on reload.

Test plan

  • First install: Remove globalStoragePath, activate extension — should download directly to flix.jar (no .new staging)
  • Mid-session update: With a running session and a newer compiler available, accept the download — should create flix.jar.new and show "Reload Now" prompt (no "Starting Flix" spinner)
  • Reload applies update: After downloading .new, click "Reload Now" — .new should be renamed to .jar, changelog shown, extension starts with new version
  • Dismiss reload: Download update, dismiss the reload prompt — old jar continues working; update applied on next VS Code restart
  • Windows: Verify the above on Windows specifically (the platform where the bug occurs)

🤖 Generated with Claude Code

magnus-madsen and others added 2 commits March 26, 2026 10:39
On Windows the JVM holds a file lock on flix.jar, so replacing it
mid-session fails. Download updates to flix.jar.new instead, prompt the
user to reload, and rename the staged file on the next startup before
the JVM starts. The changelog is deferred to after the rename so it is
not lost on reload.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@magnus-madsen magnus-madsen merged commit 7f4f29e into master Mar 26, 2026
10 of 13 checks passed
@magnus-madsen magnus-madsen deleted the fix/windows-flix-jar-file-locking branch March 26, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Download flix.jar on Windows does not work due to file locking

1 participant