Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8256755

Update build.tools.depend.Depend to handle record components in API signatures

    XMLWordPrintable

Details

    • b26

    Description

      The build.tools.depend.Depend build tool needs to be updated to handle record components in API signatures.

      For example:

      $ cat open/src/java.base/share/classes/java/util/Pair.java
      package java.util;

      /**
       * A Pair.
       */
      public record Pair<S,T> (S first, T second) { }

      chhegar$ make jdk-image
      Building target 'jdk-image' in configuration 'macosx-x64'
      Updating support/src.zip
      An exception has occurred in the compiler (16-internal). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you.
      com.sun.tools.javac.util.ClientCodeException: java.lang.UnsupportedOperationException: Not supported.
      at jdk.compiler.interim/com.sun.tools.javac.api.ClientCodeWrapper$WrappedTaskListener.finished(ClientCodeWrapper.java:868)
      at jdk.compiler.interim/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
      at jdk.compiler.interim/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1421)
      at jdk.compiler.interim/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1378)
      at jdk.compiler.interim/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:973)
      at jdk.compiler.interim/com.sun.tools.javac.main.Main.compile(Main.java:317)
      at jdk.compiler.interim/com.sun.tools.sjavac.comp.SjavacImpl.compile(SjavacImpl.java:117)
      at jdk.compiler.interim/com.sun.tools.sjavac.comp.PooledSjavac.lambda$compile$0(PooledSjavac.java:63)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
      at java.base/java.lang.Thread.run(Thread.java:832)
      Caused by: java.lang.UnsupportedOperationException: Not supported.
      at build.tools.depend.Depend$APIVisitor.visitUnknown(Depend.java:291)
      at build.tools.depend.Depend$APIVisitor.visitUnknown(Depend.java:167)
      at java.compiler.interim/javax.lang.model.element.ElementVisitor.visitRecordComponent(ElementVisitor.java:225)
      at jdk.compiler.interim/com.sun.tools.javac.code.Symbol$RecordComponent.accept(Symbol.java:1825)
      at build.tools.depend.Depend$APIVisitor.visit(Depend.java:229)
      at build.tools.depend.Depend$APIVisitor.lambda$visit$0(Depend.java:181)
      at java.base/java.lang.Iterable.forEach(Iterable.java:75)
      at build.tools.depend.Depend$APIVisitor.visit(Depend.java:181)
      at build.tools.depend.Depend$APIVisitor.visitType(Depend.java:257)
      at build.tools.depend.Depend$APIVisitor.visitType(Depend.java:167)
      at jdk.compiler.interim/com.sun.tools.javac.code.Symbol$ClassSymbol.accept(Symbol.java:1560)
      at build.tools.depend.Depend$APIVisitor.visit(Depend.java:229)
      at build.tools.depend.Depend$APIVisitor.visit(Depend.java:234)
      at build.tools.depend.Depend$1.finished(Depend.java:131)
      at jdk.compiler.interim/com.sun.tools.javac.api.ClientCodeWrapper$WrappedTaskListener.finished(ClientCodeWrapper.java:864)
      ... 11 more
      printing javac parameters to: /Users/chhegar/git/sandbox/open/make/javac.20201120_144349.args
      CompileJavaModules.gmk:609: recipe for target '/Users/chhegar/git/sandbox/build/macosx-x64/jdk/modules/java.base/_the.java.base_batch' failed
      make[3]: *** [/Users/chhegar/git/sandbox//build/macosx-x64/jdk/modules/java.base/_the.java.base_batch] Error 4
      make/Main.gmk:193: recipe for target 'java.base-java' failed
      make[2]: *** [java.base-java] Error 2

      ERROR: Build failed for target 'jdk-image' in configuration 'macosx-x64' (exit code 2)
      Stopping sjavac server

      === Output from failing command(s) repeated here ===
      * For target jdk_modules_java.base__the.java.base_batch:
      An exception has occurred in the compiler (16-internal). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you.
      com.sun.tools.javac.util.ClientCodeException: java.lang.UnsupportedOperationException: Not supported.
      at jdk.compiler.interim/com.sun.tools.javac.api.ClientCodeWrapper$WrappedTaskListener.finished(ClientCodeWrapper.java:868)
      at jdk.compiler.interim/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
      at jdk.compiler.interim/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1421)
      at jdk.compiler.interim/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1378)
      at jdk.compiler.interim/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:973)
      at jdk.compiler.interim/com.sun.tools.javac.main.Main.compile(Main.java:317)
      at jdk.compiler.interim/com.sun.tools.sjavac.comp.SjavacImpl.compile(SjavacImpl.java:117)
      at jdk.compiler.interim/com.sun.tools.sjavac.comp.PooledSjavac.lambda$compile$0(PooledSjavac.java:63)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
      at java.base/java.lang.Thread.run(Thread.java:832)
      Caused by: java.lang.UnsupportedOperationException: Not supported.
         ... (rest of output omitted)

      * All command lines available in /Users/chhegar/git/sandbox/build/macosx-x64/make-support/failure-logs.
      === End of repeated output ===

      === Make failed targets repeated here ===
      CompileJavaModules.gmk:609: recipe for target '/Users/chhegar/git/sandbox/build/macosx-x64/jdk/modules/java.base/_the.java.base_batch' failed
      make/Main.gmk:193: recipe for target 'java.base-java' failed
      === End of repeated output ===

      Hint: Try searching the build log for the name of the first failed target.
      Hint: See doc/building.html#troubleshooting for assistance.

      make[1]: *** [main] Error 2
      make: *** [jdk-image] Error 2

      Attachments

        Issue Links

          Activity

            People

              chegar Chris Hegarty
              chegar Chris Hegarty
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: