capnproto / capnproto-java

Cap'n Proto in pure Java
Other
397 stars 85 forks source link

capnpc-java schema compiler plugin should be written in Java #111

Open dwrensha opened 3 years ago

dwrensha commented 3 years ago

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

paxel commented 3 years ago

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.

WhiredPlanck commented 2 months ago

According to https://github.com/capnproto/capnproto-java/issues/136#issuecomment-1771727131, recently I try to work on implementing a compiler in Java, now is basically work. See the java-compiler branch of my fork.