Skip to content

Conversation

vedadiyan
Copy link

This PR fixes a compile-time error caused by an extra + at the end of the rawDesc constant.

Issue:
The constant was previously generated as:

const file_service_proto_rawDesc = "" + "\n" +

which left a dangling + and broke compilation.

Fix:
Updated to:

const file_service_proto_rawDesc = "\n" + ""

This removes the trailing + and restores valid code.

Copy link

google-cla bot commented Sep 10, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@vedadiyan vedadiyan changed the title fixed extra plus sign at the end of rawDesc bug fix: fixed extra plus sign at the end of rawDesc Sep 10, 2025
@puellanivis
Copy link

Thank you for your interest into contributing to this project.

Unfortunately this project does not accept GitHub pull requests as the source-of-truth for this project is hosted at https://go.googlesource.com/protobuf. This project page on GitHub is a mirror of that other repository.

If you would like to contribute to this project, please follow the contribution guidelines for instructions on how to send a change. If the change you'd like to make is more substantial or introduces any new features, then it should first be discussed on the issue tracker.

On the merits: 🤔 I’m still having trouble seeing the conditions under which this is purported to fail. When starting with a 0x0a and ending with a 0x0a, we still get valid go code, even when empty, we get valid go code: https://go.dev/play/p/jNW1Ot1MuIb

What input are you using? Maybe, instead of replying here, report this as an issue on https://github.com/golang/protobuf/issues where we keep track of issues, and can discuss what might be going wrong.

@vedadiyan
Copy link
Author

This case is a bit tricky to replicate, and I don’t think opening an issue would provide much value. However, moving the double quoted empty value to the end feels like a safer approach overall.

@puellanivis
Copy link

Right… but if there’s a reproduction case, then it is helpful and useful to present it so that people can learn from what assumptions they made when we wrote and code-reviewed this code. Then we get to learn a new corner case.

I can easily accept that moving the double quoted value to the end might feel like a safer approach overall, but I’m also a firm believer of understanding why a change is made, not just changes for the sake of changes.

@vedadiyan
Copy link
Author

I’ve finally decided to continue with my own fork and maintain a customized version to fit my needs. For that reason, I’ll close this pull request.

@vedadiyan vedadiyan closed this Sep 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants