Hi Roman!
First of all, let me thank you for your project of a Java agent for ICP! This is a crucial project for ICP, particularly as enterprise integrations are becoming more important with the upcoming UTOPIA private networks, for which enterprises and government agencies are a key target. As we all know, most enterprises and government agencies rely on the JVM technology stack for much of their services.
I am currently myself involved in a project for which the smart contract needs to be integrated with multiple enterprises and government entities, all of which rely on the JVM / Java stack. Thus, I started building the integration using your Java agent. In principle, things work, but I did find some aspects where we could improve to make the developer experience better.
I discussed with our growth team and suggested to approach you and ask you whether you would be interested in working more on this project on another grant. If so, I can provide you with some feedback that I have gained while working with your library so far. The API of my canister is rather large, currently comprising over 50 Java classes, and I think to have uncovered key aspects of developer experience where we could improve the library to make it even better for everyone.
Regarding the automated class generation, I did not find a command line tool (also no reference to one in the documentation), so I repurposed one of your test cases in the ic4j-codegen
project to generate the classes as you did for your examples. This is a bit more of an effort, but works well for me now. However, I found one bug in the code generation that I would like to let you know about: When a Candid type contains an array of another Candid type, the resulting Java class has an Object[]
instead of an array of the correct class.
Example: That is what is generated for the type
type PendingActionsForEntityResponse = Result.Result<[ActionExternal], Error>;
:
@Name("ok")
@Field(Type.RESERVED)
public Object[] okValue;
What should be generated is the following:
@Name("ok")
@Field(Type.RESERVED)
public ActionExternal[] okValue;
Has our growth team already got in touch with you about this? Are you still interested in working on this, in my view very important, project?