Skip to content

feat(pilota-build): add ConfiguredSerdePlugin to preserve IDL fields#369

Merged
Joshuahoky merged 2 commits into
mainfrom
feat/preserve_idl_fields
Jul 20, 2026
Merged

feat(pilota-build): add ConfiguredSerdePlugin to preserve IDL fields#369
Joshuahoky merged 2 commits into
mainfrom
feat/preserve_idl_fields

Conversation

@Joshuahoky

Copy link
Copy Markdown
Contributor

Motivation

Currently, generated structs and enums from IDL have their field names changed to either snake_case or PascalCase respectively. Users who needs the format to line up with the IDL would have to write their own plugin logic which is inconvenient.

Solution

Adds preserve_idl_field_names flag (false by default) and a new plugin ConfiguredSerdePlugin which emits #[serde(rename = "")] on each field that doesn't already carry an explicit #[serde(rename)], restoring the IDL spelling in the serialized output without overriding user-specified renames.

@Joshuahoky
Joshuahoky requested review from a team July 17, 2026 02:37
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.35714% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.46%. Comparing base (b33e2e1) to head (0bc868e).

Files with missing lines Patch % Lines
pilota-build/src/plugin/serde.rs 80.00% 22 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #369      +/-   ##
==========================================
+ Coverage   68.25%   68.46%   +0.20%     
==========================================
  Files          89       89              
  Lines       25818    25924     +106     
==========================================
+ Hits        17622    17748     +126     
+ Misses       8196     8176      -20     

☔ View full report in Codecov by Harness.
📢 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.

@junliurs junliurs closed this Jul 17, 2026
@Joshuahoky Joshuahoky reopened this Jul 17, 2026
@Joshuahoky
Joshuahoky merged commit d8c1fef into main Jul 20, 2026
14 checks passed
@Joshuahoky
Joshuahoky deleted the feat/preserve_idl_fields branch July 20, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants