False error in external specs: a @Ghost the constructor does not set gives "Ghost 'old' could not be found" at the next from-only call
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 58/100
Línea de trabajo
Start with the external refinement spec and client in the minimal reproducer, then trace how the external @Ghost declaration is handled when checking the constructor and the following canUndo() call. Compare that path with the in-source example described in the issue. Done means the reproducer reports “Correct! Passed Verification.” while preserving the reported behavior for the other examples.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Impact: adding a @Ghost to an external spec breaks correct programs, unless every constructor sets the ghost. The error names a ghost called old, which is internal and not in the spec.
Minimal reproducer (an external spec and a client, in one directory)
// EditRefinements.java
@ExternalRefinementsFor("javax.swing.undo.AbstractUndoableEdit")
@StateSet({"done", "undone"})
@Ghost("int supported")
public interface EditRefinements {
@StateRefinement(to = "done(this)")
void AbstractUndoableEdit();
@StateRefinement(from = "done(this)")
boolean canUndo();
}
// Client.java
public class Client {
public static void main(String[] args) {
AbstractUndoableEdit e = new AbstractUndoableEdit();
e.canUndo();
}
}
Expected: Correct! Passed Verification.
Actual (main @ f7f366c, and 1a506fe):
Not Found Error: Ghost 'old' could not be found
The same shape written in-source (an annotated class with the same @Ghost) verifies. So does the external spec when the constructor's to also sets the ghost: to = "done(this) && supported(this) == 0".
Real-world scenario. I was writing a spec for javax.management.modelmbean.RequiredModelMBean with a ghost to refuse load()/store(), which always throw; from = "false" doesn't work (#449). With the ghost unset, every correct call such as m.setModelMBeanInfo(info) failed with this error.
- Lenguaje dominante
- Java
- Estrellas
- 71
- Forks
- 37
- Merge medio
- 1 d 19 h
- PR fusionados (30 d)
- 57
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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.
Más de liquid-java/liquidjava
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
liquid-java/liquidjava#443 ·
Los mantenedores suelen responder en 2 días
-
bug real-world-finding
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
liquid-java/liquidjava#395 ·
Los mantenedores suelen responder en 2 días
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
liquid-java/liquidjava#373 ·
Los mantenedores suelen responder en 2 días
-
External specs: a @StateSet declared later in the file is not found by an interface earlier in itAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 58/100
liquid-java/liquidjava#452 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
liquid-java/liquidjava#451 ·
Los mantenedores suelen responder en 2 días
Todos los issues de liquid-java/liquidjava
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
breaking change bug needs human review not ready priority medium size S
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
martin-francois/symphony-trello#1193 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Mend: dependency security vulnerability
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100