<[email protected]> 于2023年10月31日周二 20:38写道:
> [email protected] > <https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/protobuf/topics> > Google > Groups > <https://groups.google.com/forum/?utm_source=digest&utm_medium=email/#!overview> > <https://groups.google.com/forum/?utm_source=digest&utm_medium=email/#!overview> > Topic digest > View all topics > <https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/protobuf/topics> > > - Error "Tried to write the same file twice." only with kotlin > <#m_-3159296908485004170_group_thread_0> - 1 Update > > Error "Tried to write the same file twice." only with kotlin > <http://groups.google.com/group/protobuf/t/dc9c558a27474e8a?utm_source=digest&utm_medium=email> > Choucroute_melba <[email protected]>: Oct 30 04:52PM -0700 > > 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 > Back to top <#m_-3159296908485004170_digest_top> > You received this digest because you're subscribed to updates for this > group. You can change your settings on the group membership page > <https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/protobuf/join> > . > To unsubscribe from this group and stop receiving emails from it send an > email to [email protected]. > -- 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/CAKO%2B%2BBuY_zhufqynGF%2BUD5LV9S7QdjKr4wCUWpugZqM6Axr61w%40mail.gmail.com.
