Open andreaTP opened 2 weeks ago
@andreaTP do I understand correctly that Wat2Wasm
should be resolved to class inside wabt/src/main/java/com/dylibso/chicory/wabt/Wat2Wasm.java?
If so:
Wat2Wasm
doesn't have a constructor with Instance
as a parameterThanks a lot for having a look @bashor !
Wat2Wasm
is a pure class file generated with ASM, it doesn't have a corresponding .java
file associated.
The generated source file Wat2WasmMachineFactory.java
is a wrapper to avoid that the IDE breaks in user land, but is correctly using Wat2Wasm
as it has a constructor that takes Instance
as a parameter.
The problem is that IntelliJ, apparently, doesn't recognize Wat2Wasm
at all.
I guess IJ doesn't resolve classes in the output dir of the same module. You can try to put generated files into a separate module and depend on it. Or generate class files into a separate folder and add it to dependencies.
Thanks for getting back and the suggestion @bashor , it was my very first attempt, but, unfortunately it doesn't work, you can reproduce on this branch
That said, even if we get this setup to work, I hope we can narrow down the root cause. This is the developer experience we are giving to the users, and asking to create straightaway 2 sub-modules to achieve the functionality seems not optimal.
Well, adding the directory to dependencies manually via Project Structure
seems to work.
Unfortunately, I can't help more here 🤷♂️.
Thanks a lot for the effort and your help on this @bashor . One last question, if you don't mind: is it reasonable to expect updates on the YouTrack issue? Any better alternative to get the ball rolling?
Thanks!
One last question, if you don't mind: is it reasonable to expect updates on the YouTrack issue?
IDK, it's a different team, and I am not aware of their process. I've set a more specific Subsystem there; let's wait for some time 🤷♂️.
Steps to reproduce:
machine-tests/target/generated-sources/chicory-aot/com/dylibso/chicory/wabt/Wat2WasmMachineFactory.java
You can notice that
Wat2Wasm
is not recognized by the IDE.The current workaround to generate a source file
Wat2WasmMachineFactory
to wrap the generated code masks the issue to the users, but still, it should be great to have a working setup. Everything works as expected with plain Maven commands.I attempted to ask for help at the IntelliJ boot at Devoxx, but haven't received a contact back so far. The issue is completely reproducible, but I have no clue where to start to debug/narrow it down.
Attempting to summon @bashor for guidance on how to progress with this :pray: