Developer
Harsh Chokshi
hchok@meta.com
Performance
Key patterns and highlights from this developer's activity.
Breakdown of growth, maintenance, and fixes effort over time.
Bugs introduced vs. fixed over time.
Reclassifies engineering effort based on bug attribution. Commits that introduced bugs are retrospectively counted as poor investments.
Investment Quality reclassifies engineering effort based on bug attribution data. Commits identified as buggy origins (those that introduced bugs later fixed by someone) have their grow and maintenance time moved into the Wasted Time category. Their waste (fix commits) remains counted as productive. All other commits retain their standard classification: grow is productive, maintenance is maintenance, and waste (fixes) is productive.
The standard model classifies commits as Growth, Maintenance, or Fixes. Investment Quality adds a quality lens: a commit that introduced a bug is retrospectively counted as a poor investment — the engineering time spent on it was wasted because it ultimately required additional fix work. Fix commits (Fixes in the standard model) are reframed as productive, because fixing bugs is valuable work.
Currently computed client-side from commit and bug attribution data. Ideal server-side endpoint:
POST /v1/organizations/{orgId}/investment-quality
Content-Type: application/json
Request:
{
"startTime": "2025-01-01T00:00:00Z",
"endTime": "2025-12-31T23:59:59Z",
"bucketSize": "BUCKET_SIZE_MONTH",
"groupBy": ["repository_id" | "deliverer_email"]
}
Response:
{
"productivePct": 74,
"maintenancePct": 18,
"wastedPct": 8,
"buckets": [
{
"bucketStart": "2025-01-01T00:00:00Z",
"productive": 4.2,
"maintenance": 1.8,
"wasted": 0.6
}
]
}Latest analyzed commits from this developer.
| Hash | Message | Date | Files | Effort |
|---|---|---|---|---|
| dc81655d | This commit **refactors** the **Rust code generation templates** within the Thrift compiler by **centralizing serialization and deserialization logic** for various types. It introduces new **Whisker partials** like `types.write`, `types.read`, `fields.write`, and `fields.read` in `types.mustache` and `fields.mustache` to encapsulate these operations. Templates for **client, server arguments, structs, unions, sets, and maps** are updated to leverage these partials for consistent I/O. This **refactoring** significantly improves the **maintainability of the Rust code generator** and ensures a standardized approach to data serialization and deserialization in the generated Rust code. | Mar 31 | 11 | maint |
| 517eafed | This commit **refactors** the **Rust code generation templates** within the Thrift compiler to adopt explicit Whisker `structured` handles. It **migrates** `lib/unionimpl.mustache` and `lib/metadata/struct.mustache` to use `structured.` prefixes for template variable references, moving away from the implicit `struct:` context. Additionally, `types_split.mustache` and `types.rs.mustache` are updated to introduce a `structured` variable alias for `struct:self`, aligning with the new convention. This standardization of template variable access improves the maintainability and clarity of the Rust code generation process for Thrift structs and unions. | Mar 31 | 4 | maint |
| a3331a28 | This commit performs a significant **refactoring** of the **Thrift compiler's Rust code generation templates** to enhance their genericity and accuracy. The core change involves renaming `lib/struct.mustache` to `lib/structured.mustache` and migrating the template to render using a `structured` variable, which correctly encompasses structs, unions, and exceptions, not just structs. This update impacts several Rust template files, including `mod.unadapted.mustache`, `types_split.mustache`, and `types.rs.mustache`, ensuring consistent usage of the new `structured` context for defining complex types. The change improves the **maintainability and extensibility** of the Rust code generation system by providing a more semantically accurate representation of structured definitions. | Mar 31 | 5 | maint |
| 393ba7c1 | This commit **refactors the Rust Thrift code generation system** by migrating its enum templates from an implicit `mstch` context to use explicit `Whisker` syntax. It updates the **Rust Thrift compiler generator** (`t_mstch_rust_generator.cc`) to support this change, including renaming internal data structures like `rust_mstch_program` and removing an unused enum splitting method. The **Rust enum template** (`lib/enum.mustache`) and other related type templates (`types_split.mustache`, `types.rs.mustache`) are modified to leverage `Whisker`'s explicit property access and `each` iteration syntax. This **template engine migration** enhances the clarity and maintainability of the Rust code generation logic for enums. | Mar 31 | 4 | maint |
| 3fefbde8 | This commit **refactors** the **Thrift Rust compiler's template generation** by **migrating** the `typedef.mustache` and `typedefimpl.mustache` templates, along with `types_split.mustache` and `types.rs.mustache`, from an implicit Mustache context to the **Whisker template engine**. This involves updating the template syntax to use Whisker-style properties and adjusting conditional logic and loop constructs. Consequently, the `current_split_typedefs` method is removed from `t_mstch_rust_generator.cc`, simplifying the backend logic for assigning split IDs and generating Rust type definitions. This **template engine migration** streamlines the process of generating Rust type definitions by leveraging Whisker's capabilities and removing deprecated Mustache-specific code. | Mar 31 | 5 | maint |
| 2400e60d | This commit performs a **refactoring** of the **Thrift compiler's Rust code generation templates** to simplify their syntax. It removes unnecessary brace escapes (`\{`) from various template files, including those for `enum` definitions, server implementations, `struct` and `union` implementations, and mock generation. This change addresses a specific templating rule, improving the readability and maintainability of the template source code without altering the functionality or output of the generated Rust code. The scope is limited to the internal structure of the `thrift/compiler/generate/templates/rust/` directory, streamlining template development. | Mar 31 | 10 | maint |
| ead0c763 | This commit **refactors** the **Thrift Rust compiler** by migrating the `program:nonstandardTypes` and `program:nonstandardFields` properties to leverage the **Whisker templating engine**. The `t_mstch_rust_generator.cc` now defines these properties through new Whisker helper functions, replacing older direct method calls. Correspondingly, the Rust code generation templates, such as `lib/mod.impl.mustache`, have been updated to consume these properties via Whisker, improving variable scoping and template clarity. This **maintenance** effort streamlines the internal architecture of the **Rust code generator**, leading to more consistent and maintainable handling of non-standard type and field definitions in the generated Rust code. | Mar 31 | 3 | maint |
| f27ac598 | This commit **fixes a bug** in the **Thrift compiler's Whisker templating engine** that caused incorrect trailing whitespace to be emitted. Previously, the rendering logic would apply indentation to empty lines within partials and macros, resulting in blank lines containing only spaces. This **bug fix** modifies the `writeln_to_sink` method in `thrift/compiler/whisker/render.cc` to skip emitting indentation for empty newlines. Consequently, generated code will now be cleaner, avoiding extraneous whitespace and improving compatibility with tools sensitive to such formatting. New test cases have been added to confirm this corrected behavior for both partials and macros. | Mar 31 | 347 | maint |
| 99a22dda | This commit introduces a **refactoring** to the **Whisker generator** within the **Thrift compiler** to enhance its efficiency. It modifies `t_whisker_generator.cc` by incorporating `std::move` for array constructions in functions such as `make_prototype_for_field`, `make_prototype_for_const_value`, and `make_prototype_for_program`. Additionally, shorter aliases are now used for various whisker functions. This change primarily aims to **optimize performance** by **avoiding unnecessary copies** during the code generation process, leading to a more efficient compiler. | Mar 31 | 1 | maint |
| 54097e06 | This commit performs a **refactoring** of the **Thrift compiler's Rust code generation templates** by extracting common logic for rendering Rust field types. It introduces a new `lib/fields.mustache` template containing `annotated_type_name` and `type_name` partials, which centralize the representation of inner and wrapped Rust types (e.g., `Option`, `Box`, `Arc`). This change improves the modularity and maintainability of the generated Rust code by ensuring consistent type rendering across various contexts, including **struct definitions**, **server argument types**, and **serialization/deserialization implementations**. | Mar 30 | 7 | maint |
| 5b047a26 | This commit performs a significant **refactoring** of the **Thrift Rust generator** by migrating several `mstch` (Mustache) template properties to their **Whisker** equivalents. Specifically, it moves `program:types_with_constructors`, `program:type_splits`, and properties related to current split structs/typedefs/enums to the new templating system, while also removing old `mstch` adapter properties like `program:adapted_structs` by replacing template usages with direct iteration. This **internal compiler change** modernizes the Rust code generation infrastructure, affecting `t_mstch_rust_generator.cc` and several Rust templates like `mod.adapters.mustache`, and includes a utility enhancement to `to_type_array` for broader collection support. This work is part of an ongoing effort to fully transition the Rust generator to Whisker, improving maintainability and flexibility. | Mar 29 | 6 | maint |
| 8ba9496e | This commit performs a **refactoring** of the **Rust Thrift compiler's type-split assignment logic** within `t_mstch_rust_generator.cc`. It **extracts the state** related to type splitting from the `rust_mstch_program` component into a new, dedicated `rust_split_info` struct. This new structure, representing individual output splits and their contained types, is now owned and managed by the `t_mstch_rust_generator` class. This change improves the **maintainability and clarity** of the Rust code generation process by centralizing the ownership and management of type-split information within the generator. | Mar 28 | 1 | maint |
| 5b97c286 | This commit introduces a **new configuration entry** within the `thrift/compiler/test/fixtures/basic/cmd` file, serving as a **test fixture** for the **Rust type splitting feature**. This **new capability** specifically prepares the testing environment to validate the correct generation and splitting of Rust types by the Thrift compiler. It ensures that the compiler's handling of Rust type definitions can be thoroughly tested within the **Thrift compiler's testing infrastructure**. | Mar 27 | 15 | grow |
| 4e2fd1d7 | This commit **refactors** the **Thrift Rust code generation** by migrating the service inheritance mechanism from the legacy Mstch `extendedClients` property to a new Whisker `all_parent_services` property on `t_service`. This change simplifies how **Rust client and server templates** handle inheritance, allowing them to directly access ancestor properties like `ancestor.client_package` and manage `asRefImpl` logic using `array.enumerate`. The `t_mstch_rust_generator.cc` is updated to provide this new property, and obsolete `rust_mstch_service` and `rust_mstch_interaction` classes are removed. This **migration** streamlines the **Rust code generation pipeline**, making templates more self-contained and reducing generator complexity. | Mar 27 | 5 | maint |
| 05d8bb5a | This commit **refactors** how **Rust service exception sources** are managed within the Thrift compiler, **migrating** the data collection to a more centralized approach. Specifically, the `service:rust_exceptions` property is replaced by a new `all_exception_sources` property on the `t_interface` prototype, exposed through **Whisker**. The **Thrift compiler's Rust generator** (`t_mstch_rust_generator.cc`) is updated to populate this new property via `make_prototype_for_interface`, removing the older `rust_all_exceptions` method. Consequently, the **Rust error template** (`errors.mustache`) now consumes `all_exception_sources` directly, streamlining the data model for exception handling in generated Rust code and improving maintainability. | Mar 27 | 2 | grow |
| 7c10609c | This commit performs a significant **refactoring** of the **Thrift Rust generator**, migrating service function properties and exception handling logic from custom `mstch` classes to more standardized **Whisker prototypes** and objects. It removes `rust_mstch_function` and `rust_mstch_function_factory`, replacing `service:rustFunctions` with the base `service:functions` property and `function:index` with `array.enumerate` for iteration. The `uniqueExceptions` family of properties are now defined directly on `t_function`, `t_stream`, and `t_sink` Whisker prototypes, and the `rust_all_exceptions` method is converted to a Whisker object. This change impacts the **Thrift compiler's Rust generator** (`t_mstch_rust_generator.cc`) and numerous **Rust code generation templates**, which are updated to use the new property names and access patterns, such as `field:type` within Whisker-context loops. This modernization effort simplifies the generator's internal logic, standardizes property access for **service functions** and **exception handling**, and improves the maintainability and consistency of the **generated Rust code**. | Mar 27 | 10 | maint |
| 707b6040 | This commit **refactors the Rust code generator** within the Thrift compiler by **migrating constant value and structured annotation codegen** from custom MSTCH objects to the **Whisker templating engine**. It removes Rust-specific MSTCH objects and introduces new Whisker properties like `transitive?`, `union_variant`, and an overridden `structured_elements` to correctly handle Rust's specific requirements, such as including `null` for unspecified fields in structured annotations. This **infrastructure improvement** streamlines the Rust code generation process, ensuring accurate rendering of **constant values, structured annotations, and default field values** in generated Rust code. The change affects various Rust templates, including `lib/const.mustache` and `lib/metadata/struct.mustache`, to leverage these new Whisker-based properties. | Mar 27 | 5 | maint |
| e4446748 | This commit **refactors** the **Thrift Rust code generation** to improve how type information, specifically "local type" or "underlying type," is propagated. It moves this propagation from the C++ `mstch` layer into an explicit argument of the `const_value` partial template, enhancing clarity and correctness. The `mstch_rust_value` class in `thrift/compiler/generate/t_mstch_rust_generator.cc` is updated with a `resolved_type_` member and `inner_new_type` property for `t_typedef`. Consequently, Rust templates like `constants.mustache` and `struct.mustache` are adjusted to explicitly pass `local_type` to `const_value_impl` and utilize the new `underlying_type` variable. This **refactoring** streamlines type resolution for generated Rust code, particularly for constants and structured annotations. | Mar 27 | 3 | maint |
| 13883967 | This commit **refactors** the **Thrift Rust generator** by moving the responsibility for **depth propagation** from the C++ generator into the Mustache templates. It converts `mstch_rust_value` and `fieldvalue` templates into new partials like `const_value` and `field_value` within `lib/constants.mustache`, which now explicitly accept a `depth` argument. This change primarily impacts the **generation of Rust constants and structured annotations**, allowing the C++ generator (`t_mstch_rust_generator.cc`) to become stateless regarding indentation. This improves the separation of concerns between generation logic and presentation, and unblocks further simplification of the C++ generator by removing stateful depth management. | Mar 27 | 10 | maint |
| 3831c477 | This commit **refactors** the **Thrift compiler's Rust generator** to simplify the `mstch_rust_value` object, primarily focusing on **Rust constant and value generation**. It introduces a new base Whisker prototype specifically for constant values, moving redundant properties from `mstch_rust_value` to this shared prototype. This change streamlines the internal logic within `t_mstch_rust_generator.cc` and simplifies the associated **Rust code generation templates** like `const.mustache` and `value.mustache`. By leveraging these new prototype properties, including the use of `rust_quote` for string values, the commit reduces code complexity and improves the maintainability of the Rust code generation process. | Mar 26 | 3 | maint |
This commit **refactors** the **Rust code generation templates** within the Thrift compiler by **centralizing serialization and deserialization logic** for various types. It introduces new **Whisker partials** like `types.write`, `types.read`, `fields.write`, and `fields.read` in `types.mustache` and `fields.mustache` to encapsulate these operations. Templates for **client, server arguments, structs, unions, sets, and maps** are updated to leverage these partials for consistent I/O. This **refactoring** significantly improves the **maintainability of the Rust code generator** and ensures a standardized approach to data serialization and deserialization in the generated Rust code.
This commit **refactors** the **Rust code generation templates** within the Thrift compiler to adopt explicit Whisker `structured` handles. It **migrates** `lib/unionimpl.mustache` and `lib/metadata/struct.mustache` to use `structured.` prefixes for template variable references, moving away from the implicit `struct:` context. Additionally, `types_split.mustache` and `types.rs.mustache` are updated to introduce a `structured` variable alias for `struct:self`, aligning with the new convention. This standardization of template variable access improves the maintainability and clarity of the Rust code generation process for Thrift structs and unions.
This commit performs a significant **refactoring** of the **Thrift compiler's Rust code generation templates** to enhance their genericity and accuracy. The core change involves renaming `lib/struct.mustache` to `lib/structured.mustache` and migrating the template to render using a `structured` variable, which correctly encompasses structs, unions, and exceptions, not just structs. This update impacts several Rust template files, including `mod.unadapted.mustache`, `types_split.mustache`, and `types.rs.mustache`, ensuring consistent usage of the new `structured` context for defining complex types. The change improves the **maintainability and extensibility** of the Rust code generation system by providing a more semantically accurate representation of structured definitions.
This commit **refactors the Rust Thrift code generation system** by migrating its enum templates from an implicit `mstch` context to use explicit `Whisker` syntax. It updates the **Rust Thrift compiler generator** (`t_mstch_rust_generator.cc`) to support this change, including renaming internal data structures like `rust_mstch_program` and removing an unused enum splitting method. The **Rust enum template** (`lib/enum.mustache`) and other related type templates (`types_split.mustache`, `types.rs.mustache`) are modified to leverage `Whisker`'s explicit property access and `each` iteration syntax. This **template engine migration** enhances the clarity and maintainability of the Rust code generation logic for enums.
This commit **refactors** the **Thrift Rust compiler's template generation** by **migrating** the `typedef.mustache` and `typedefimpl.mustache` templates, along with `types_split.mustache` and `types.rs.mustache`, from an implicit Mustache context to the **Whisker template engine**. This involves updating the template syntax to use Whisker-style properties and adjusting conditional logic and loop constructs. Consequently, the `current_split_typedefs` method is removed from `t_mstch_rust_generator.cc`, simplifying the backend logic for assigning split IDs and generating Rust type definitions. This **template engine migration** streamlines the process of generating Rust type definitions by leveraging Whisker's capabilities and removing deprecated Mustache-specific code.
This commit performs a **refactoring** of the **Thrift compiler's Rust code generation templates** to simplify their syntax. It removes unnecessary brace escapes (`\{`) from various template files, including those for `enum` definitions, server implementations, `struct` and `union` implementations, and mock generation. This change addresses a specific templating rule, improving the readability and maintainability of the template source code without altering the functionality or output of the generated Rust code. The scope is limited to the internal structure of the `thrift/compiler/generate/templates/rust/` directory, streamlining template development.
This commit **refactors** the **Thrift Rust compiler** by migrating the `program:nonstandardTypes` and `program:nonstandardFields` properties to leverage the **Whisker templating engine**. The `t_mstch_rust_generator.cc` now defines these properties through new Whisker helper functions, replacing older direct method calls. Correspondingly, the Rust code generation templates, such as `lib/mod.impl.mustache`, have been updated to consume these properties via Whisker, improving variable scoping and template clarity. This **maintenance** effort streamlines the internal architecture of the **Rust code generator**, leading to more consistent and maintainable handling of non-standard type and field definitions in the generated Rust code.
This commit **fixes a bug** in the **Thrift compiler's Whisker templating engine** that caused incorrect trailing whitespace to be emitted. Previously, the rendering logic would apply indentation to empty lines within partials and macros, resulting in blank lines containing only spaces. This **bug fix** modifies the `writeln_to_sink` method in `thrift/compiler/whisker/render.cc` to skip emitting indentation for empty newlines. Consequently, generated code will now be cleaner, avoiding extraneous whitespace and improving compatibility with tools sensitive to such formatting. New test cases have been added to confirm this corrected behavior for both partials and macros.
This commit introduces a **refactoring** to the **Whisker generator** within the **Thrift compiler** to enhance its efficiency. It modifies `t_whisker_generator.cc` by incorporating `std::move` for array constructions in functions such as `make_prototype_for_field`, `make_prototype_for_const_value`, and `make_prototype_for_program`. Additionally, shorter aliases are now used for various whisker functions. This change primarily aims to **optimize performance** by **avoiding unnecessary copies** during the code generation process, leading to a more efficient compiler.
This commit performs a **refactoring** of the **Thrift compiler's Rust code generation templates** by extracting common logic for rendering Rust field types. It introduces a new `lib/fields.mustache` template containing `annotated_type_name` and `type_name` partials, which centralize the representation of inner and wrapped Rust types (e.g., `Option`, `Box`, `Arc`). This change improves the modularity and maintainability of the generated Rust code by ensuring consistent type rendering across various contexts, including **struct definitions**, **server argument types**, and **serialization/deserialization implementations**.
This commit performs a significant **refactoring** of the **Thrift Rust generator** by migrating several `mstch` (Mustache) template properties to their **Whisker** equivalents. Specifically, it moves `program:types_with_constructors`, `program:type_splits`, and properties related to current split structs/typedefs/enums to the new templating system, while also removing old `mstch` adapter properties like `program:adapted_structs` by replacing template usages with direct iteration. This **internal compiler change** modernizes the Rust code generation infrastructure, affecting `t_mstch_rust_generator.cc` and several Rust templates like `mod.adapters.mustache`, and includes a utility enhancement to `to_type_array` for broader collection support. This work is part of an ongoing effort to fully transition the Rust generator to Whisker, improving maintainability and flexibility.
This commit performs a **refactoring** of the **Rust Thrift compiler's type-split assignment logic** within `t_mstch_rust_generator.cc`. It **extracts the state** related to type splitting from the `rust_mstch_program` component into a new, dedicated `rust_split_info` struct. This new structure, representing individual output splits and their contained types, is now owned and managed by the `t_mstch_rust_generator` class. This change improves the **maintainability and clarity** of the Rust code generation process by centralizing the ownership and management of type-split information within the generator.
This commit introduces a **new configuration entry** within the `thrift/compiler/test/fixtures/basic/cmd` file, serving as a **test fixture** for the **Rust type splitting feature**. This **new capability** specifically prepares the testing environment to validate the correct generation and splitting of Rust types by the Thrift compiler. It ensures that the compiler's handling of Rust type definitions can be thoroughly tested within the **Thrift compiler's testing infrastructure**.
This commit **refactors** the **Thrift Rust code generation** by migrating the service inheritance mechanism from the legacy Mstch `extendedClients` property to a new Whisker `all_parent_services` property on `t_service`. This change simplifies how **Rust client and server templates** handle inheritance, allowing them to directly access ancestor properties like `ancestor.client_package` and manage `asRefImpl` logic using `array.enumerate`. The `t_mstch_rust_generator.cc` is updated to provide this new property, and obsolete `rust_mstch_service` and `rust_mstch_interaction` classes are removed. This **migration** streamlines the **Rust code generation pipeline**, making templates more self-contained and reducing generator complexity.
This commit **refactors** how **Rust service exception sources** are managed within the Thrift compiler, **migrating** the data collection to a more centralized approach. Specifically, the `service:rust_exceptions` property is replaced by a new `all_exception_sources` property on the `t_interface` prototype, exposed through **Whisker**. The **Thrift compiler's Rust generator** (`t_mstch_rust_generator.cc`) is updated to populate this new property via `make_prototype_for_interface`, removing the older `rust_all_exceptions` method. Consequently, the **Rust error template** (`errors.mustache`) now consumes `all_exception_sources` directly, streamlining the data model for exception handling in generated Rust code and improving maintainability.
This commit performs a significant **refactoring** of the **Thrift Rust generator**, migrating service function properties and exception handling logic from custom `mstch` classes to more standardized **Whisker prototypes** and objects. It removes `rust_mstch_function` and `rust_mstch_function_factory`, replacing `service:rustFunctions` with the base `service:functions` property and `function:index` with `array.enumerate` for iteration. The `uniqueExceptions` family of properties are now defined directly on `t_function`, `t_stream`, and `t_sink` Whisker prototypes, and the `rust_all_exceptions` method is converted to a Whisker object. This change impacts the **Thrift compiler's Rust generator** (`t_mstch_rust_generator.cc`) and numerous **Rust code generation templates**, which are updated to use the new property names and access patterns, such as `field:type` within Whisker-context loops. This modernization effort simplifies the generator's internal logic, standardizes property access for **service functions** and **exception handling**, and improves the maintainability and consistency of the **generated Rust code**.
This commit **refactors the Rust code generator** within the Thrift compiler by **migrating constant value and structured annotation codegen** from custom MSTCH objects to the **Whisker templating engine**. It removes Rust-specific MSTCH objects and introduces new Whisker properties like `transitive?`, `union_variant`, and an overridden `structured_elements` to correctly handle Rust's specific requirements, such as including `null` for unspecified fields in structured annotations. This **infrastructure improvement** streamlines the Rust code generation process, ensuring accurate rendering of **constant values, structured annotations, and default field values** in generated Rust code. The change affects various Rust templates, including `lib/const.mustache` and `lib/metadata/struct.mustache`, to leverage these new Whisker-based properties.
This commit **refactors** the **Thrift Rust code generation** to improve how type information, specifically "local type" or "underlying type," is propagated. It moves this propagation from the C++ `mstch` layer into an explicit argument of the `const_value` partial template, enhancing clarity and correctness. The `mstch_rust_value` class in `thrift/compiler/generate/t_mstch_rust_generator.cc` is updated with a `resolved_type_` member and `inner_new_type` property for `t_typedef`. Consequently, Rust templates like `constants.mustache` and `struct.mustache` are adjusted to explicitly pass `local_type` to `const_value_impl` and utilize the new `underlying_type` variable. This **refactoring** streamlines type resolution for generated Rust code, particularly for constants and structured annotations.
This commit **refactors** the **Thrift Rust generator** by moving the responsibility for **depth propagation** from the C++ generator into the Mustache templates. It converts `mstch_rust_value` and `fieldvalue` templates into new partials like `const_value` and `field_value` within `lib/constants.mustache`, which now explicitly accept a `depth` argument. This change primarily impacts the **generation of Rust constants and structured annotations**, allowing the C++ generator (`t_mstch_rust_generator.cc`) to become stateless regarding indentation. This improves the separation of concerns between generation logic and presentation, and unblocks further simplification of the C++ generator by removing stateful depth management.
This commit **refactors** the **Thrift compiler's Rust generator** to simplify the `mstch_rust_value` object, primarily focusing on **Rust constant and value generation**. It introduces a new base Whisker prototype specifically for constant values, moving redundant properties from `mstch_rust_value` to this shared prototype. This change streamlines the internal logic within `t_mstch_rust_generator.cc` and simplifies the associated **Rust code generation templates** like `const.mustache` and `value.mustache`. By leveraging these new prototype properties, including the use of `rust_quote` for string values, the commit reduces code complexity and improves the maintainability of the Rust code generation process.
Commit activity distribution by hour and day of week. Shows when this developer is most active.
Developers who frequently work on the same files and symbols. Higher score means stronger code collaboration.