Using the D8 dexer is impaired by the kawa generated code

Attempting to generate a huge project using lots of libraries and blocks (16000 blocks), I ran out of space in the first dex using dx and the multidex option.

At first d8 seems to solve the problem as I have been able to overcome the size limit.
However d8 is sensitive to what seems bad code generated by kawa where static final class variables are initialized in the constructor (this is not correct java).
I am not sure where the root of the problem lies:
runtime.scm ?
kawa itself ?

Looking at the Screen1.class disassembly, I see:
public class Screen1 extends Form implements Runnable {
public static Screen1 Screen1;
static final ModuleMethod lambda$Fn1;
public Screen1() { // constructor
Screen1$frame var10003 = new Screen1$frame();
ModuleMethod var10000 = new ModuleMethod(var1, 172, (Object)null, 0);
var10000.setProperty("source-location", "/tmp/runtime839817310025717437.scm:622");
lambda$Fn1 = var10000; // should not initialize a static final in a constructor

Thanks in advance for any hints.


I don't know much about Java, but I understand that you are trying to bypass the DX error in compiler?