redhat-developer / redhat-developer/vscode-java

hot code replace set to auto causes endless "appyling code changes" notifications

オープン
#2,350 コメント 14 件 リアクション 3 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug compile
主要言語
TypeScript
スター
2.3k
フォーク
546
平均マージ
20時間 1分
マージ済み PR(30日)
11

説明

Usually I use the "hode code replace" feature set to auto, so whenever I save the code is automatically injected into the running process. Since a few days this is not working as expected any more.
As soon as I save, the functionality kicks in and the java LSP process goes crazy. It goes up to 200-300% CPU and never comes back.
The problem seems to be that the "Applying code changes ..." functionality is repeatedly started over and over again, but seems to never stop.
It does not recover on its own, I have to restart vscode.

Environment
  • Operating System: macOS 11.6.2 (20G314)
  • JDK version:openjdk 17.0.1 2021-10-19
  • Visual Studio Code version: 1.65.1
  • Java extension version: v0.22.0
Steps To Reproduce
  1. Set "Hot code replace" to auto
  2. Halt on breakpoint
  3. Change code and save a few times in a row

After a few times it looks like this:
The log contains proprietary code, so I cannot easily share it here. But it seems fine, no repeating (error) messages of any kind. Just the change detection seems to kick in repeatedly and invoke the "hot code replace" every time (which never returns).

Current Result

"Applying code changes" goes crazy.
Bildschirmfoto 2022-03-09 um 09 53 40

Expected Result

Apply codes changes. Java LSP process should permanently consume 200-300% CPU after it.

Additional Informations

If I use the manual "hot code replace" (the lightning symbol), I can't reproduce the issue.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず automatic hot code replace、ブレークポイント、複数回の保存で問題を再現し、その後、Java LSP hot-code-replace と変更検出のエントリポイントを調べます。これを手動の lightning-button フローと比較します。繰り返し保存しても変更が一度だけ適用され、無限に通知が発生したり、CPU 使用率が 200–300% で持続したりしなければ完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java, typescript, vscode
領域
developer-experience, tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。