Skip to content

Commit

Permalink
8296137: diags-examples.xml is broken
Browse files Browse the repository at this point in the history
Reviewed-by: iris, vromero, ihse
  • Loading branch information
jonathan-gibbons committed Nov 7, 2022
1 parent 00d22f6 commit f8b2574
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions make/langtools/diags-examples.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ Usage:
By default, the reports will be generated in langtools/build/diags-examples/report/.
-->

<project name="diags-examples" default="diags-examples" basedir="..">
<project name="diags-examples" default="diags-examples" basedir="../..">
<import file="build.xml"/>

<!-- specify working directory for the tool -->
<property name="diags.examples.dir" location="${build.dir}/diag-examples"/>

<!-- compiled classes for the tool -->
<property name="diags.examples.classes" location="${diags.examples.dir}/classes}"/>
<property name="diags.examples.classes" location="${diags.examples.dir}/classes"/>

<!-- directory for generated reports -->
<property name="diags.examples.report" location="${diags.examples.dir}/report"/>

<!-- default target, generates reports for all available locales -->
<target name="diags-examples" depends="run-en_US,run-ja,run-zh_CN"/>
<target name="diags-examples" depends="run-en_US,run-ja,run-zh_CN,run-de"/>

<!-- generate report for US English locale -->
<target name="run-en_US" depends="-build-runner,-def-runner">
Expand All @@ -68,12 +68,18 @@ By default, the reports will be generated in langtools/build/diags-examples/repo
<runner lang="zh" country="CN" outfile="${diags.examples.report}/zh_CN.html"/>
</target>

<!-- generate report for German locale -->
<target name="run-de" depends="-build-runner,-def-runner">
<mkdir dir="${diags.examples.report}"/>
<runner lang="de" outfile="${diags.examples.report}/de.html"/>
</target>

<!-- compile the tool that runs the examples -->
<target name="-build-runner" depends="build">
<mkdir dir="${diags.examples.classes}"/>
<javac fork="true"
executable="${build.bin}/javac"
srcdir="test/tools/javac/diags"
srcdir="test/langtools/tools/javac/diags"
destdir="${diags.examples.classes}"
includes="ArgTypeCompilerFactory.java,Example.java,FileManager.java,HTMLWriter.java,RunExamples.java,DocCommentProcessor.java"
sourcepath=""
Expand All @@ -98,7 +104,7 @@ By default, the reports will be generated in langtools/build/diags-examples/repo
<sequential>
<java fork="true"
jvm="${langtools.jdk.home}/bin/java"
dir="test/tools/javac/diags"
dir="test/langtools/tools/javac/diags"
classpath="${diags.examples.classes};${dist.lib.dir}/javac.jar;${dist.lib.dir}/javap.jar"
classname="RunExamples">
<jvmarg value="-Duser.language=@{lang}"/>
Expand Down
2 changes: 1 addition & 1 deletion test/langtools/tools/javac/diags/Example.java
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ private void run(PrintWriter out, Set<String> keys, boolean raw, boolean verbose
//automatic modules:
Map<String, List<Path>> module2Files =
modulePathFiles.stream()
.map(f -> f.toPath())
.map(f -> f.toPath().toAbsolutePath())
.collect(Collectors.groupingBy(p -> modulePath.relativize(p)
.getName(0)
.toString()));
Expand Down

3 comments on commit f8b2574

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on f8b2574 Mar 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on f8b2574 Mar 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GoeLin the backport was successfully created on the branch backport-GoeLin-f8b2574e in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit f8b2574e from the openjdk/jdk repository.

The commit being backported was authored by Jonathan Gibbons on 7 Nov 2022 and was reviewed by Iris Clark, Vicente Romero and Magnus Ihse Bursie.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev.git backport-GoeLin-f8b2574e:backport-GoeLin-f8b2574e
$ git checkout backport-GoeLin-f8b2574e
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev.git backport-GoeLin-f8b2574e

Please sign in to comment.