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
Maintainer antworten meist innerhalb von 2 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 58/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Java
- Sterne
- 71
- Forks
- 37
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 57
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus liquid-java/liquidjava
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
liquid-java/liquidjava#443 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
bug real-world-finding
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
liquid-java/liquidjava#395 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
liquid-java/liquidjava#373 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
External specs: a @StateSet declared later in the file is not found by an interface earlier in itOffen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 58/100
liquid-java/liquidjava#452 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
liquid-java/liquidjava#451 ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in liquid-java/liquidjava
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
breaking change bug needs human review not ready priority medium size S
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
martin-francois/symphony-trello#1193 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
Mend: dependency security vulnerability
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100