getappmap / getappmap/appmap-java
CannotCompileException thrown while recording
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 88
- Fork
- 17
- Merge medio
- 2g 2h
- PR unite (30g)
- 1
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia tracciando HookClassSystem.match e Hook.apply, quindi riproduci il fallimento con ./appmap_remote.sh ./tmp/appmap nello scenario spring-petclinic descritto. Verifica come vengono gestiti i metodi ereditati e i metodi di più interfacce quando viene applicato un hook a un’interfaccia. Il lavoro è completato quando la registrazione non fallisce più in compilazione a causa di metodi imprevisti e i metodi dell’interfaccia sottoposta a hook continuano a catturare eventi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- devtools
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100