Error examples page

Jonathan Gibbons jonathan.gibbons at oracle.com
Thu Nov 10 19:19:28 UTC 2022


As a followup, the code to generate diags-examples.html needed some TLC, 
and was fixed in JDK-8296137 <https://bugs.openjdk.org/browse/JDK-8296137>.

The command to generate the report is effectively this:

JAVA_HOME=$JDK $ANT \
     -Dlangtools.jdk.home=$JDK \
     -f make/langtools/diags-examples.xml

where:

  * the current directory is the root of the OpenJDK repo
  * ANT refers to a recent executable for Ant,
  * JDK refers to a build of JDK in the same repo containing the
    examples directory

The report will be written to build/langtools/diags-examples/

-- Jon

On 10/3/22 1:22 PM, Jonathan Gibbons wrote:
>
> It's generated by the code in open/test/langtools/tools/javac/diags/.
>
> There are various classes there, like RunExamples.java, 
> CheckExamples.java etc. You are probably looking for RunExamples.java; 
> there are comments in the code on how to use it.
>
> -- Jon
>
> On 10/3/22 7:31 AM, Ethan McCue wrote:
>> Hey all,
>>
>> My group stumbled upon this page with a bunch of error examples in a 
>> nice presentable format.
>>
>> https://cr.openjdk.java.net/~jjg/diags-examples.html 
>> <https://cr.openjdk.java.net/~jjg/diags-examples.html>
>>
>> My suspicion is that this was generated by something in the codebase 
>> - if so does anyone know the command of the top of their head?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20221110/764bf811/attachment-0001.htm>


More information about the compiler-dev mailing list