Skip to content

fix(internal/librarian/rust): map recursive fields to Box#4074

Merged
coryan merged 1 commit intogoogleapis:mainfrom
olavloite:map-recursive-fields-to-boxed
Feb 16, 2026
Merged

fix(internal/librarian/rust): map recursive fields to Box#4074
coryan merged 1 commit intogoogleapis:mainfrom
olavloite:map-recursive-fields-to-boxed

Conversation

@olavloite
Copy link
Contributor

Recursive fields that are not repeated or oneof should be mapped to Box.

Recursive fields that are not repeated or oneof should be mapped to Box.
@olavloite olavloite requested a review from a team as a code owner February 16, 2026 16:17
Copy link
Contributor

@coryan coryan left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces logic to detect when prost will box a recursive field and updates the code generation templates accordingly. The core detection logic in mapToBoxed appears sound. However, there are a couple of issues. A test case for a map with a recursive value has an incorrect expectation for whether the field will be boxed. Additionally, the new template logic for converting to the prost type is missing a necessary dereference for boxed types, which will cause a compilation error. I've left specific comments with suggestions to address these points.

@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.93%. Comparing base (0a5722d) to head (8ca9c5f).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4074   +/-   ##
=======================================
  Coverage   81.93%   81.93%           
=======================================
  Files          78       78           
  Lines        6516     6516           
=======================================
  Hits         5339     5339           
  Misses        832      832           
  Partials      345      345           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coryan coryan merged commit e323d45 into googleapis:main Feb 16, 2026
15 checks passed
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