getappmap / getappmap/appmap-java

CannotCompileException thrown while recording

オープン
#33 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

主要言語
Java
スター
88
フォーク
17
平均マージ
2日 2時間
マージ済み PR(30日)
1

説明

Scenario 1 :
Suppose we have an interface Parent with method foo declared in it, another interface Child which extends Parent, and has method bar in it. Now we have written a class Implementation which implements interface Child and have method bodies for foo and bar. Now suppose we have hooked Parent class with our HookClassSystem and have written methods to capture events for this interface. Now during runtime, when foo is called on an object of Implementation, event will get captured as expected. However, this won't be same for bar method's execution. The point of interest is match method in HookClassSystem. It will return true for both methods as their declaring class Implementation is child of Parent. The problem will occur when Hook.apply method gets called for foo and bar behaviours. foo method will have respective method to capture event in appmap-java codebase as we have consciously added it. however, for bar , which was unexpected, will result in a failed to compile message when appropriate event capturing method is not found in appmap-java.

Scenario 2 :
Same situation may occur when a class implements multiple interfaces, out of which we have hooked one interface using HookClassSystem

Scenario 1 can be seen with spring-petclinic where we have hooked java.sql.Statement.
error message failed to compile can be seen using remote recording script : ./appmap_remote.sh ./tmp/appmap

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

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

はじめの一歩

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

調査の方向性

まず HookClassSystem.match と Hook.apply を追跡し、次に説明されている spring-petclinic シナリオに対して ./appmap_remote.sh ./tmp/appmap を使って失敗を再現します。インターフェースに hook を設定したときに、継承されたメソッドと複数のインターフェースにまたがるメソッドがどのように扱われるかを確認します。予期しないメソッドがあっても記録処理のコンパイルが失敗せず、hook を設定したインターフェースのメソッドが引き続きイベントをキャプチャできれば完了です。

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

評価

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

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

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