Hi!
I'd like to use the Eclipse Compiler in Bazel. However, this does not seem to be easy.
First, I tried to write a new java_toolchain by patching the toolchain "@bazel_tools//tools/jdk:toolchain_java11".
However, I could not find out how to persuade "@bazel_tools/tools/jdk:javabuilder" to accept my ecj.jar.
Now I'm think about updating VanillaJavaBuilder. I could replace "ToolProvider.getSystemJavaCompiler()" (that always seems to return the same JavaCompiler class from the JDK) with a call to the Java Service Provider Interface to make it discover other compilers, too: my ecj.jar.
However, instead of (at least temporarily) forking VanillaJavaBuilder, I'd much prefer a way without forking. Any ideas?
Best regards
Johannes Abt