Soundness: a Java version set in the maven-compiler-plugin configuration is ignored, so declarations are dropped and verification passes
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 62/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- java
- Domínio
- build-system, compilers
Direção de pesquisa
Start in ComplianceLevel, where the Java version is read from the maven.compiler.release and maven.compiler.source properties of the nearest pom.xml. Recreate the reproducer from the issue (a pom with a maven-compiler-plugin <release>17</release> override and src/main/java/demo/Retry.java) and confirm that verification passes today. Done means the plugin configuration takes precedence, so the @Refinement on line 7 produces a Refinement Error. The second suggested fix, changing the warning behaviour, needs a maintainer decision and is out of scope for a first contribution.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Impact: a real bug passes verification (false negative), with only a warning. Found while investigating #342.
Description
ComplianceLevel reads the Java version only from the maven.compiler.release / maven.compiler.source properties of the nearest pom.xml that has one. A version set in the maven-compiler-plugin configuration (<release>, <source>) is ignored. When the properties say a lower version than the code needs, Spoon parses at that level, newer constructs are mis-parsed, and whole declarations disappear from the model. The run prints "Java compilation encountered issues" and then "Correct! Passed Verification."
Common setup: a parent pom with maven.compiler.source 1.8 and a module that overrides the version in its compiler-plugin configuration.
Minimal reproducer (directory with this pom.xml and src/main/java/demo/Retry.java)
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>demo</groupId><artifactId>demo</artifactId><version>1</version>
<properties><maven.compiler.source>1.8</maven.compiler.source></properties>
<build><plugins><plugin>
<groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId>
<configuration><release>17</release></configuration>
</plugin></plugins></build>
</project>
package demo;
import liquidjava.specification.Refinement;
public record Retry(int attempts) {
void fail() {
@Refinement("_ > 0") int n = -1;
}
}
Expected
A Refinement Error on line 7.
Actual (main ad055b49)
Warning: Java compilation encountered issues. Verification may be affected.
Correct! Passed Verification.
Possible fixes
- Read
<release>/<source>from themaven-compiler-pluginconfiguration, giving it precedence over the properties as Maven does. - More generally, do not report "Correct! Passed Verification." after compilation problems that may have dropped declarations (e.g. report them as errors, or say verification is incomplete). This changes what users see, including in the IDE, so it needs a decision.
- Linguagem predominante
- Java
- Estrelas
- 73
- Forks
- 38
- Merge médio
- 12h 32min
- PRs com merge (30d)
- 45
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de liquid-java/liquidjava
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
liquid-java/liquidjava#562 ·
Mantenedores costumam responder em até 1 dia
-
A float ghost crashes the verifier: "Ghost not implemented for type float"Talvez já em andamento @MohammedZaid1740 assumiu há 7 dias. Abertabug good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
liquid-java/liquidjava#443 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug real-world-finding
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
liquid-java/liquidjava#395 ·
Mantenedores costumam responder em até 1 dia
-
A ternary between arrays crashes: Sorts (Array Int Int) and Bool are incompatibleTalvez já em andamento @CatarinaGamboa assumiu há 4 dias. Abertabug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 15/100
liquid-java/liquidjava#558 ·
Mantenedores costumam responder em até 1 dia
-
new T[a][b] gets length b instead of a (unsound)Talvez já em andamento @CatarinaGamboa assumiu há 4 dias. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 30/100
liquid-java/liquidjava#557 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de liquid-java/liquidjava
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 60/100
quelea-projection/Quelea#749 ·
Mantenedores costumam responder em até 1 dia
-
free_port can hand one port to two callers, so the fixed-port http tests fail in parallel runsAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 92/100
erkamyaman/rust-anything#963 ·
Mantenedores costumam responder em até 1 dia
-
api-diagnostics bug jdbc
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
ClickHouse/clickhouse-java#3464 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 Meio dia Facilidade para iniciantes 76/100
-
Deferred
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Sanne/incus-spawn#2768 ·
Mantenedores costumam responder em até 1 dia