-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different TS output on macOS & Windows #1072
Comments
Thanks for the report, Cody. Generated code should be identical, regardless of the platform it's generated on. But I'm not sure that this is a bug in protoc-gen-es - it might be an issue in the compiler. This can be isolated by compiling the Protobuf source to a set of descriptors first, then generating code on both platforms from this set of descriptors. With buf:
With protoc:
Could you give this a try? If protoc-gen-es still generates different code, this is a bug in protoc-gen-es. If it doesn't, it's an issue in the compiler. |
I realized that it could be in either place, but wasn't sure how to debug. Thanks for the steps! I'll try to test that this evening and get back to you! |
If you're using git, this might be caused by the setting I'm not sure if a Protobuf compiler should normalize line endings in comments 🤔 If this is caused by git, I suggest trying to disable the option. |
I'm using protobuf-es from Deno, using the script I linked to over here: #293 (comment)
The TypeScript output on Windows and macOS has some whitespace differences. In comments like this:
the
*
characters on a single line have a trailing space on macOS, and none on Windows.It's a minor issue, but is a bit of an annoyance if I'm regenerating the file on different computers. Makes for noisy git diffs.
The text was updated successfully, but these errors were encountered: