Closed ymarco closed 1 year ago
It clearly does seem like an issue 😓 tbh, I've never used, or considered Windows in the process of developing this library. I'll take a look at other kotlin code generation libraries and find out what I should do to solve this. Thanks for the report! 🙇♂️
I'm having trouble getting to the cause of this issue because I don't have a viable windows environment around me that I could debug this with. I think it will take me a few weeks to get this fixed 😢
One thing I noticed from other codegen libraries is that they don't seem to use different line separators 🤔. kotlinpoet also uses "\n"
as a linebreaker, and it's hard to think that they haven't considered Windows so there might be a chance that the setup in which you ran the test may have something to do with it.
i'll keep this thread updated on my progress and feel free to help me while I'm at it.
so there might be a chance that the setup in which you ran the test may have something to do with it.
I'll try to run it in another windows machine on the weekend
Yep, I get the same output on another laptop with freshly-installed java and protoc.
@ymarco, thank you for verifying it again 🙇♂️. I plan to get my hands on a Windows computer this weekend and hope to fix the issue soon.
Hi @ymarco :wave:
I recently had the opportunity to debug this issue on a Windows system and identified a solution. Simply include @ECHO OFF
in your .cmd file, like this:
:: run-krotoDC.cmd
@ECHO OFF
java -jar protoc-gen-krotodc-1.0.1-jdk8.jar %*
I discovered this fix by examining how the protobuf-gradle-plugin executes the plugins (link). As it turns out, the parsing error was not related to line separators, but rather caused by echoed commands. Please let me know if this resolves the issue for you. If the problem persists, feel free to reopen this issue so I can address it further.
Hi! The plugin seems to work fine on Linux, but on windows I've reached this problem:
Now run
protoc --plugin=protoc-gen-krotoDC=run-krotoDC.cmd --krotoDC_out=. test.proto
, and we get:To me it seems like a
\n
/\r\n
issue. Any thoughts?