adoptium / adoptium/aqa-tests

Support compiling Java source files with other Java compilers

Open
#6,083 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
155
Forks
346
Avg merge
2d 9h
Merged PRs (30d)
36

Description

Given a particular Java source file, different Java compilers might produce class files containing different, but equivalent, Java bytecode. Assuming the bytecode is correct, a JVM implementation should be able to correctly load and execute the bytecode in those class files. See https://github.com/eclipse-openj9/openj9/issues/21417 for an example of a case in which OpenJ9 crashed running a test that had been compiled with the Eclipse Compiler for Java.

It would be nice to be able to exercise different combinations of Java compilers and JVM implementations using existing tests that would ordinarily be compiled using the javac compiler that is included with a Java SDK.

Obviously that might not scale well, given the number of different combinations of existing tests, JDK versions and JVM implementations would need to be run with different Java compilers.

Another approach that @llxia suggested might be to have a fixed set of tests that are compiled with ECJ or other Java compilers.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing how existing tests are compiled with the javac compiler included in a Java SDK. Compare that flow with the proposed ECJ or other compiler combinations, using the OpenJ9 issue 21417 example as context. Done would mean a defined, maintainable set of tests and a documented way to compile and run them with alternate Java compilers.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.