capnproto-java icon indicating copy to clipboard operation
capnproto-java copied to clipboard

capnpc-java schema compiler plugin should be written in Java

Open dwrensha opened this issue 4 years ago • 2 comments

Currently, capnpc-java is written in C++ and depends on upstream capnproto-c++ libraries. Distribution would be simplified it it were written in Java.

dwrensha avatar Aug 20 '21 14:08 dwrensha

A while ago I wanted to create a code generator from capnproto schema that creates pojo classes. at some point I got a distracted and totally forgot about it. https://github.com/paxel/admiral-plasma I don't even know in which state it is. (update: unusable weirdo code) I parsed the schema (update: no I didn't) and used a lib

<dependency>
            <groupId>com.squareup</groupId>
            <artifactId>javapoet</artifactId>
            <version>1.11.1</version>
        </dependency>

to create code. might be worth a look.

I later forked capnproto Java and improved the generated code of the c++ generator (for a special project, that is dead now) to the extend that it was absurd 😅 definitely not Worth a look https://github.com/paxel/capnproto-java.

I agree that a pure Java code generator would significantly increase the usability.

paxel avatar Aug 20 '21 18:08 paxel