eclipse-platform / eclipse-platform/eclipse.platform
When a plugin with a setJvm action in its uninstall phase is uninstalled, the -vm parameter in the _eclipse.ini_ file is not updated
- 主要言語
- Java
- スター
- 165
- フォーク
- 174
- 平均マージ
- 2日 8時間
- マージ済み PR(30日)
- 22
説明
When a plugin with a _setJvm_ action defined in its uninstall phase is uninstalled, the _-vm_ parameter in the _eclipse.ini_ file is not updated until some other plugin is installed. That can be observed by uninstalling the embedded _JRE_, whose _p2.inf_ file contains this:
```
instructions.uninstall = \
org.eclipse.equinox.p2.touchpoint.eclipse.setJvm(jvm:null);
```
Until the time when another plugin is installed, Eclipse will keep using the same embedded _JRE_ and the _-vm_ parameter will stay in the _eclipse.ini_ file. It is easily reproducible:
1. Install an eclipse form scratch (by unzipping _eclipse-java-2022-03-R-win32-x86_64.zip_)
2. Uninstall the embedded _JRE_ (_org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.2.v20220201-1208_).
3. After restarting Eclipse, the _-vm_ parameter has not changed and still has the default value: (..._plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.2.v20220201-1208/jre/bin\server\jvm.dll_). Using process monitor, you can see that the _eclipse.exe_ executable is still using that _dll_.
4. No matter how many times Eclipse is restarted, the -vm parameter stays there.
5. If any other plugin is installed, the _-vm_ parameter finally disappears from the _eclipse.ini_ file. The parameter disappears when the installation of that other plugin finishes (no need to restart Eclipse for it to disappear).
_Note_: uninstalling other plugins does not make the _-vm_ parameter disappear. It is only when an other plugin is installed that it disappears.
Observed on: _Eclipse 2022_03 (4.23), Windows 10._
This bug may be related to [550091](https://bugs.eclipse.org/bugs/show_bug.cgi?id=550091) or [551378](https://bugs.eclipse.org/bugs/show_bug.cgi?id=551378).
コントリビューションガイド
調査の方向性
組み込み JRE を使用したアンインストールシーケンスを再現し、p2.inf ファイル内のアンインストール用 setJvm アクションを eclipse.ini ファイルと併せて調査します。後続のインストールの場合と比較して、プラグインのアンインストール中に -vm パラメーターがいつ書き換えられるかを追跡します。組み込み JRE をアンインストールすると、別のプラグインインストールを必要とせず、-vm が直ちに更新または削除されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100