SuduIDE / protogen

Protogen is the tool that relieves developers from writing boilerplate code for protobuf models and gRPC clients by generating high-level domain object Java classes with concise API suitable for business logic. It's easy to configure and integrate into a simple project with gRPC.
Apache License 2.0
2 stars 0 forks source link

Urgent Assistance Request for Protogen Tool #17

Open Bahri-Adem opened 6 months ago

Bahri-Adem commented 6 months ago

Dear SuduIDE,

I hope you're doing well. I'm a master's student working on my thesis, and I've encountered difficulties in getting your Protogen tool to work with both Maven and Gradle. This tool is crucial for my research, and having it operational would greatly aid me.

Could you please provide guidance or assistance on how to properly configure and use Protogen? Your support would be immensely valuable to me, as I'm pressed for time and in need of this plugin for my thesis work.

Thank you for your help.

Looking forward to your guidance and support.

Best regards, Adem Bahri

image And here is my plugin: image

The readme seems to be not so clear !

Duzhinsky commented 6 months ago

Hi there! Protogen is a tool designed primarily for the internal needs of SuduIDE with its specifics. At the moment, the status of its public support is unknown. Also, It was not designed for use with maven.

As far as I can see, you are using the options dependency as an executable in the plugin, however it should be a general dependency of your project.

To understand your problem, I need to know more. What is going wrong?

Bahri-Adem commented 6 months ago

Hi there,

Thank you for your prompt response. I appreciate your willingness to assist me with the issues I've encountered while using Protogen for my thesis project.

Even after correcting my pom.xml file as per your suggestion, I'm still facing the same problem. Specifically, the toGrpc and fromGrpc methods are not being generated as expected. Additionally, when I run mvn clean install, it seems that no records are being added to my implementation.

To provide more clarity on the matter, I've pushed my project to GitHub. You can access it through the following link: ( https://github.com/Bahri-Adem/ProtoGen-Implementation).

I would greatly appreciate it if you could take a look at my project and provide any insights or guidance on resolving these issues. Your expertise and assistance are invaluable to me, especially considering the significance of Protogen for my thesis work.

Looking forward to your feedback and support.

Best regards, Adem Bahri

<project xmlns="http://maven.apache.org/POM/4.0.0"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

4.0.0 fr.bl.greenit.protogen ProtogenImpl 0.0.1-SNAPSHOT UTF-8 17 17 17 3.21.9 1.51.0 io.github.suduide protogen-options 1.0.3 io.github.suduide protoc-gen-protogen 1.0.18 options jar com.google.protobuf protobuf-java ${protobuf.version} org.xolstice.maven.plugins protobuf-maven-plugin 0.6.1 com.google.protobuf:protoc:3.18.0:exe:windows-x86_64 protogen ***@***.*** ${project.basedir}/src/main/generated/java compile

Duzhinsky commented 6 months ago

Hello, again. I've tried researching about building with maven. Here is the correct configuration for linking protobuf plugins.

<configuration>
    <outputDirectory>${basedir}/target/generated-sources/protobuf/java</outputDirectory>
    <protocArtifact>com.google.protobuf:protoc:3.18.0:exe:osx-aarch_64</protocArtifact>
    <protocPlugins>
        <protocPlugin>
            <id>protogen</id>
            <groupId>io.github.suduide</groupId>
            <artifactId>protoc-gen-protogen</artifactId>
            <version>1.0.18</version>
            <mainClass>org.sudu.protogen.Main</mainClass>
        </protocPlugin>
    </protocPlugins>
</configuration>

But it won't work because the the artifact is not published as maven plugin expects, i.e. io.github.suduide:protoc-gen-protogen:jar:1.0.18.

Currently I am not a maintainer of the repository, so fixing it is not easy. Here is what I could suggest you:

The latter is the most preferable because Protogen is designed for SuduIDE team conventions of working with gRPC. I have considered a community version with a flexible interface like the Spring OpenAPI Generator has, but it is still a plan.