Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

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

Ouverte
#378 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
55/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
java

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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).

Langage dominant
Java
Étoiles
67
Forks
36
Merge moyen
2 j 4 h
PR mergées (30 j)
28

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de liquid-java/liquidjava

Toutes les issues de liquid-java/liquidjava

Issues similaires

Plus d'issues Java

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.