Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

States named across specs resolve only if the declaring spec was registered first

Offen
#378 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
java

Rechercherichtung

Start by tracing how spec types are registered and how @StateSet names are resolved for @StateRefinement references; the issue does not identify specific files or tests. Reproduce with the JFrame, Frame, and AWindow specs in the reported order, then move AWindowSpec before the others to compare results. Done means verification no longer depends on spec declaration order.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug

A spec may name a state declared in another class's spec (by simple name, through the hierarchy). This only works if the spec with the @StateSet is registered first, which follows textual order.

@ExternalRefinementsFor("javax.swing.JFrame")
public interface JFrameSpec {
    @StateRefinement(to = "notDisplayable(this)")
    void JFrame(String title);
}
@ExternalRefinementsFor("java.awt.Frame")
interface FrameSpec {
    @StateRefinement(from = "notDisplayable(this)")
    void setUndecorated(boolean undecorated);
}
@StateSet({"notDisplayable", "displayable"})
@ExternalRefinementsFor("java.awt.Window")
interface AWindowSpec {
    @StateRefinement(to = "displayable(this)") void pack();
    @StateRefinement(to = "notDisplayable(this)") void dispose();
}

On main 321a7321, with a client that builds a JFrame: Not Found Error: Ghost 'javax.swing.JFrame.notDisplayable' could not be found. With AWindowSpec moved first in the file: Correct! Passed Verification.
We should get this in the first pass.

Expected: the result does not depend on the order of the spec types (e.g. register all @StateSets before resolving state names in refinements).

Vorherrschende Sprache
Java
Sterne
67
Forks
36
Ø Merge
2 T. 4 Std.
Gemergte PRs (30 T.)
28

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus liquid-java/liquidjava

Alle Issues in liquid-java/liquidjava

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.