Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

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

Aberta
#378 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
55/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
java
Domínio
compilers, testing-qa

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
Java
Estrelas
67
Forks
36
Merge médio
2d 4h
PRs com merge (30d)
28

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de liquid-java/liquidjava

Todas as issues de liquid-java/liquidjava

Issues semelhantes

Mais issues de Java

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.