-
Notifications
You must be signed in to change notification settings - Fork 175
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
Differences in SourceCodeInfo Locations between desc/protoparse and protoc #212
Comments
I think I see what they are doing. I just re-read the spec (e.g. comments for So, for path I think the only element that spans whole regions is the empty path, which indicates the range of the entire file. So I think I can get rid of the recent change I made and replace it with something that is likely a little simpler. Other differences I see:
|
BTW, for the things above that I said are bugs in |
I think I've fixed nearly all of these variances in a PR that did a fairly substantial overhaul of how source code info is generated: #240. I'm closing this. The only remaining variances I see are behavior in protoc that I don't think I want this package to perfectly emulate (they are inconsistencies with how protoc treats the "default" and "json_name" pseudo-options; protoparse treats them consistent with other options). I'll file questions with the main protobuf project to get some clarity -- maybe they'll result in fixes in protoc, so it would then more closely match the protoparse package. |
Discussed offline - there's still differences between the SourceCodeInfo Locations between desc/protoparse and protoc.
I think the easiest way to share this is via the FileDescriptorSets that are outputted. I ran
goprotoc
andprotoc
for https://github.com/googleapis/googleapis/tree/master/google/api/experimental (a small package in googleapis) to make this easier.Reproduction is at https://github.com/pedgeio/goprotoctest/blob/9c184ad4659b6672cb1798014b5aa6ecc8809463/internal/goprotoctest/goprotoctest_test.go#L47 - if you set up the repository per the README.md, comment out the
t.Skip
call, and runmake test
, you will get two JSON files, one atinternal/goprotoctest/tmp/goprotoc.json
and one atinternal/goprotoctest/tmp/protoc.json
.The contents of those files are at https://gist.github.com/pedgeio/bc1e343e5cca4c424a374eb6e8aa3182 - note that that gist has two files, you just have to scroll way down to get to
protoc.json
.Differences I notice at first glance:
protoc.json
The text was updated successfully, but these errors were encountered: