salesforce / salesforce/bazel-jdt-java-toolchain
Adapt bazel-jdt-java-toolchain to latest ecj changes
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
See https://github.com/eclipse-jdt/eclipse.jdt.core/pull/2577, some changes were merged to JDT core to support bazel-jdt-java-toolchain.
bazel-jdt-java-toolchain doesn't seem to support those changes yet though, when using both latest ecj and bazel-jdt-java-toolchain, we get this error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/compiler/batch/FileSystem$ClasspathAnswer
at com.google.devtools.build.buildjar.javac.BlazeEcjMain$BlazeEclipseBatchCompiler.getLibraryAccess(BlazeEcjMain.java:173)
at org.eclipse.jdt.core.compiler.batch/org.eclipse.jdt.internal.compiler.batch.Main.performCompilation(Main.java:4675)
at org.eclipse.jdt.core.compiler.batch/org.eclipse.jdt.internal.compiler.batch.Main.compile(Main.java:1679)
at com.google.devtools.build.buildjar.javac.BlazeEcjMain.compile(BlazeEcjMain.java:331)
at com.google.devtools.build.buildjar.ReducedClasspathJavaLibraryBuilder.compileSources(ReducedClasspathJavaLibraryBuilder.java:58)
at com.google.devtools.build.buildjar.SimpleJavaLibraryBuilder.compileJavaLibrary(SimpleJavaLibraryBuilder.java:120)
at com.google.devtools.build.buildjar.SimpleJavaLibraryBuilder.run(SimpleJavaLibraryBuilder.java:128)
at com.google.devtools.build.buildjar.BazelEcjJavaBuilder.build(BazelEcjJavaBuilder.java:110)
at com.google.devtools.build.buildjar.BazelEcjJavaBuilder.parseAndBuild(BazelEcjJavaBuilder.java:82)
at com.google.devtools.build.buildjar.BazelEcjJavaBuilder.main(BazelEcjJavaBuilder.java:70)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jdt.internal.compiler.batch.FileSystem$ClasspathAnswer
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
... 10 more
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading Eclipse JDT core pull request 2577 and reproducing the reported failure with the latest ECJ and bazel-jdt-java-toolchain. Trace BlazeEcjMain.getLibraryAccess and the missing FileSystem$ClasspathAnswer class in the stack trace. Done means the toolchain works with the ECJ changes without this NoClassDefFoundError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100