Skip to content

Pretty-print SourceCodeInfo in IR test goldens#686

Merged
mcy merged 7 commits intomainfrom
mcy/sourceinfodecode
Mar 18, 2026
Merged

Pretty-print SourceCodeInfo in IR test goldens#686
mcy merged 7 commits intomainfrom
mcy/sourceinfodecode

Conversation

@mcy
Copy link
Member

@mcy mcy commented Mar 18, 2026

The current test goldens for SourceCodeInfo are unreadable. This PR adds a stand-alone SCI decoder specifically for use in goldens, and adds support to prototest/yaml.go for printing arbitrary Go values.

The SourceCodeInfo golden is broken out into its own test output, separate from the FDP.

This PR also adds a helper binary that decodes an FDS's SourceCodeInfo, for easily extracting what protoc is doing.

@mcy mcy requested a review from doriable March 18, 2026 17:38
Copy link
Member

@doriable doriable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, there might be some merge issues ^^" But stamping this first.

@mcy mcy enabled auto-merge (squash) March 18, 2026 22:30
@mcy mcy merged commit 67c8432 into main Mar 18, 2026
6 checks passed
@mcy mcy deleted the mcy/sourceinfodecode branch March 18, 2026 22:37
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