#1548: avoid Windows plugin locks during IDE updates - #2363
Open
cap-juan wants to merge 1 commit into
Open
Conversation
cap-juan
force-pushed
the
feature/1548-windows-fail-when-plugin-update
branch
from
August 24, 2026 12:49
e9f3936 to
169e2f7
Compare
Collaborator
Coverage Report for CI Build 32729199500Coverage increased (+0.04%) to 73.511%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions55 previously-covered lines in 6 files lost coverage.
Coverage Stats💛 - Coveralls |
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.
This PR fixes #1548
Implemented changes:
This PR changes plugin handling so that IDE updates on Windows no longer fail when the currently running IDE keeps files from an old plugin installation locked.
Previously, plugins were installed into one shared directory per IDE, for example:
plugins/intellij/During an IntelliJ update, IDEasy reset this directory before installing plugins for the new IDE version. On Windows, this could fail when the currently running IntelliJ instance still had plugin files open, for example native files belonging to plugins such as GitHub Copilot.
Plugins are now stored per IDE version:
This allows the new IDE version and its plugins to be installed independently from the plugin directory still used by the running old IDE.
Plugin directory handling
PluginBasedCommandletnow resolves the plugin installation path using the installed IDE version:plugins/<tool>/<version>For example:
Plugin marker files also contain the IDE version so plugin state is tracked independently for each installed IDE version. After plugins for the new IDE version have been installed, IDEasy tries to remove obsolete version directories (this cleanup is best-effort only).
If Windows prevents deletion because the old IDE still holds files open, IDEasy logs a warning such as:
The IDE update itself continues successfully. Once the old IDE is closed, a later
install/updatecan remove the obsolete plugin directory.JetBrains IDE plugin loading:
IntelliJ-based IDEs are configured to use the version-specific plugin path through:
-Didea.plugins.path=<IDE_HOME>/plugins/<tool>/<version>The generated VM options therefore point each IDE version to its corresponding plugin directory. Example:
-Didea.plugins.path=C:\Users\...\IDEasy\plugins\intellij\2026.2This applies to IntelliJ IDEA, PyCharm and Android Studio.
JetBrains Marketplace plugin installation:
Marketplace plugins are now downloaded directly instead of invoking the IDE's installPlugins command.
This is important because invoking IntelliJ while another IntelliJ instance is already running can fail with the single-instance restriction and therefore still prevent plugin installation during an IDE update.
Plugin archives are installed according to their archive type:
ZIP plugins are extracted directly into the version-specific plugin directory so their own directory structure is preserved. For example a Marketplace archive containing:
becomes:
JAR plugins are extracted into a directory named after the plugin ID. This distinction is necessary because standalone plugin JARs do not necessarily contain their own surrounding plugin directory. Custom plugin repository URLs continue to use the existing IDE command-based installation mechanism.
Other IDEs:
VS Code now also uses the version-specific plugin directory through its
--extensions-dirargument.Eclipse configuration paths are based on the version-specific plugin installation directory, for example:
plugins/eclipse/2024-09/configurationTests were updated accordingly.
Testing instructions
Please add concise, understandable instructions on how a reviewer can test/verify the functionality of your contribution here:
The issue was reproduced using IntelliJ IDEA on Windows.
Configure an older IntelliJ version, for example:
INTELLIJ_VERSION=2026.1.4Install IntelliJ:
ide install intellijVerify that the configured plugin is installed under the version-specific directory:
ls -la "$IDE_HOME/plugins/intellij"Expected:
2026.1.4Start IntelliJ:
ide intellijKeep the old IntelliJ instance running.
Change the configured IntelliJ version to a newer supported version, for example:
INTELLIJ_VERSION=2026.2While the old IntelliJ instance is still running, execute:
ide updateVerify that:
Example warning:
Close the old IntelliJ instance and start the new one:
ide intellijVerify:
Example:
-Didea.plugins.path=...\plugins\intellij\2026.2Close IntelliJ and run another update:
ide updateVerify that the obsolete plugin directory can now be removed and only the current plugin directory remains:
ls -la "$IDE_HOME/plugins/intellij"Expected:
2026.2Checklist for this PR
Make sure everything is checked before merging this PR. For further info please also see
our DoD.
mvn clean testlocally all tests pass and build is successful#«issue-id»: «brief summary»(e.g.#921: fixed setup.batand notfeature/921 fixed setup.bat). If no issue ID exists, title only.In Progressand assigned to you or there is no issue (might happen for very small PRs)with
internalpom.xmlfiles or otherwise if runtime dependencies changed, you have updated our LICENSE.asciidocChecklist for tool commandlets
Have you added a new
«tool»as commandlet? There are the following additional checks:«tool»«TOOL»_VERSIONand«TOOL»_EDITIONare honored by your commandlet