getappmap / getappmap/appmap-java
CannotCompileException thrown while recording
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Java
- Estrellas
- 88
- Forks
- 17
- Merge medio
- 2 d 2 h
- PR fusionados (30 d)
- 1
Descripción
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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza rastreando HookClassSystem.match y Hook.apply, y luego reproduce el fallo con ./appmap_remote.sh ./tmp/appmap utilizando el escenario de spring-petclinic descrito. Comprueba cómo se gestionan los métodos heredados y los métodos de múltiples interfaces cuando se aplica un hook a una interfaz. Se considera terminado cuando la grabación ya no falla al compilar debido a métodos inesperados y los métodos de la interfaz con hook siguen capturando eventos.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- devtools
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100