I'm trying to build the arduino cli grpc sources (
https://github.com/arduino/arduino-cli/tree/master/rpc) in Kotlin using the 
gradle protobuf plugin.
So I have four outputs in my build : grpc, grpckt, java and kotlin an 
kotlin is the only one to fail with the following error : 


*Execution failed for task ':stub:generateProto'.> protoc: stdout: . 
stderr: cc/arduino/cli/commands/v1/BoardKt.kt: Tried to write the same file 
twice.*

I have tried a lot of things but I really don't know how to work around 
this error, especially because it work with every other languages.

If it can help, here is the command that the gradle plugin execute and the 
one that the arduino team execute to build their Go sources :

Gradle : 
```
D:\Vivien\AppData\.gradle\caches\modules-2\files-2.1\com.google.protobuf\protoc\3.24.1\3052022638437eefd2645963518be582bb24273a\protoc-3.24.1-windows-x86_64.exe,
 
-ID:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main, 
-ID:\Vivien\Projects\Idea\intellino\stub\build\extracted-include-protos\main, 
--java_out=D:\Vivien\Projects\Idea\intellino\stub\build\generated\source\proto/main/java,
 
--kotlin_out=D:\Vivien\Projects\Idea\intellino\stub\build\generated\source\proto/main/kotlin,
 
--plugin=protoc-gen-grpc=D:\Vivien\AppData\.gradle\caches\modules-2\files-2.1\io.grpc\protoc-gen-grpc-java\1.57.2\5670558169ce74039d210781b06c8d8136c0868f\protoc-gen-grpc-java-1.57.2-windows-x86_64.exe,
 
--grpc_out=D:\Vivien\Projects\Idea\intellino\stub\build\generated\source\proto/main/grpc,
 
--plugin=protoc-gen-grpckt=D:\Vivien\Projects\Idea\intellino\stub\build\scripts\protoc-gen-grpc-kotlin-1.4.0-jdk8-generateProto-trampoline.bat,
 
--grpckt_out=D:\Vivien\Projects\Idea\intellino\stub\build\generated\source\proto/main/grpckt,
 
D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\board.proto,
 
D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\commands.proto,
 
D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\common.proto,
 
D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\compile.proto,
 
D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\core.proto,
 
D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\debug.proto,
 
D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\lib.proto,
 
D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\monitor.proto,
 
D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\port.proto,
 
D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\upload.proto,
 
D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\settings\v1\settings.proto
```

Arduino (from their github repo)
```
     protoc --proto_path=rpc --go_out=./rpc --go_opt=paths=source_relative 
--go-grpc_out=./rpc --go-grpc_opt=paths=source_relative 
./rpc/cc/arduino/cli/commands/v1/*.proto'
      protoc --proto_path=rpc --go_out=./rpc --go_opt=paths=source_relative 
--go-grpc_out=./rpc --go-grpc_opt=paths=source_relative 
./rpc/cc/arduino/cli/settings/v1/*.proto'
```
Thanks in advance, - Vivien



-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/ccefbf3c-3847-44ab-bcc9-243a8004f4b9n%40googlegroups.com.

Reply via email to