Developer
Shai Szulanski
iahs@meta.com
Performance
YoY:+673%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 |
|---|
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.
| Effort |
|---|
| 40b200f9 | This commit performs a **refactoring** within the **Thrift C++2 library**, specifically simplifying the `AnyData::toAny` function. It replaces complex, nested `std::conditional_t` logic used for selecting the appropriate protocol writer with the more streamlined `protocol::ProtocolWriterFor<Protocol>` helper. This change improves code readability and maintainability within the `thrift/lib/cpp2/type/Any.h` module. The core purpose is to enhance the internal implementation of `AnyData`'s serialization mechanism without altering existing functionality for **Binary, Compact, and SimpleJSON protocols**. | Mar 31 | 1 | maint |
| 0509fdb9 | This commit **rolls out** the use of `op::encode` for C++ serialization within the **Thrift compiler**, aiming for **performance improvements** and **easier maintenance** compared to generated serialization code. The **Thrift compiler's C++ generator** (`t_mstch_cpp2_generator.cc`) is updated to identify structs eligible for `op::encode`, and the **C++ serialization templates** (`serialize_struct.mustache`) are modified to conditionally generate the optimized serialization calls. This **feature rollout** applies to structs that do not utilize `deprecated_terse_writes` or `cpp.lazy`, providing a significant **performance boost** for serialization in a majority of applicable cases. | Mar 31 | 82 | grow |
| a1f759c6 | This commit introduces a **performance optimization** and **refactoring** within **Thrift's `OpEncode` protocol implementation** to mitigate code bloat. It applies `FOLLY_NOINLINE` to the `Encode<type::i64_t>` operators in `thrift/lib/cpp2/op/detail/Encode.h`, preventing the large varint encoding logic for 64-bit integers from being inlined at every call site. This change addresses i-cache pressure and reduces binary size, leading to a **10% speedup** for `ComplexStruct` writes using `CompactProtocol`. The work also includes **comprehensive benchmark enhancements** to validate the optimal `NOINLINE` scope across various integer types and data structures. | Mar 31 | 4 | maint |
| 5610325c | This commit introduces a **significant refactoring** to the **Thrift Python3 generator** by enabling direct resolution of field-level `@cpp.Type` annotations. It adds new field-aware properties and caching mechanisms within `t_mstch_py3_generator.cc` and `cpp/util.cc`, allowing the generator to explicitly query `cpp.Type` information from the field rather than relying on type-level propagation. This change is further supported by the addition of numerous **field-aware template partials** across the Python3 templates, ensuring generated code correctly reflects these specific field annotations. This **maintenance** work is output-preserving and unblocks future simplifications by removing an indirect semantic lowering step, leading to a more robust and accurate code generation pipeline. | Mar 31 | 45 | grow |
| 241a2872 | This commit implements a **performance optimization** to address a significant regression in the **`StructEncode`** mechanism, which previously suffered from non-inlined lambda calls during field iteration. The fix involves applying `FOLLY_ALWAYS_INLINE` to core field iteration utilities like `for_each_field_id` and `for_each_ordinal` in `thrift/lib/cpp2/op/Get.h`, and replacing intermediate lambdas with `FOLLY_ALWAYS_INLINE` functors within both the generic iteration infrastructure and the `StructEncode` implementation in `thrift/lib/cpp2/op/detail/Encode.h`. This change eliminates substantial per-field function call overhead, resulting in **performance improvements** of up to 12% for nested maps and 8% for complex structs during encoding. The **optimization** benefits all callers utilizing the `for_each_field_id` infrastructure with `FOLLY_ALWAYS_INLINE` functors, ensuring field writes are fully inlined. | Mar 30 | 2 | waste |
| d96928a2 | This commit **refactors** the **Thrift Python generator** to directly check field-level `@cpp.Type` annotations, particularly for `IOBuf` types, within its code generation templates. It introduces new C++ utility overloads like `is_type_iobuf` and field-aware properties in `t_mstch_python_generator.cc` to enable this direct inspection. Numerous **Python code generation templates** are updated to utilize new partials such as `field_typeinfo` and `field_pep484_type`, which now handle `IOBuf` types directly at the field level. This change simplifies the type propagation logic by unblocking the removal of a semantic lowering step, representing a significant **internal improvement** without altering generated output. | Mar 30 | 16 | grow |
| 3919f031 | This commit introduces a significant **refactoring** to the Thrift compiler's **parsing logic**, causing it to **reject unstructured annotations** (e.g., `(key = "value")`) at parse time. The `thrift/compiler/parse/parser.cc` module now immediately issues a parser error for such annotations, with the exception of `hs.*` annotations which are silently dropped. This change simplifies the compiler pipeline by shifting validation left, leading to the removal of related dead code in `thrift/compiler/sema/standard_validator.cc` and the deprecation of several compiler flags in `thrift/compiler/compiler.cc`. The **downstream impact** is that users will now receive clearer, earlier error messages for invalid annotation syntax, requiring updates to any Thrift IDL files still using the deprecated unstructured format. | Mar 30 | 12 | maint |
| d39df20a | This commit introduces **SimpleJson protocol support** to the `AnyData::get` and `AnyData::toAny` functions within the **Thrift C++2 library**. This **new capability** extends the `AnyData` utility, which previously only supported Binary and Compact protocols, to now properly serialize and deserialize data using SimpleJson. The change primarily affects the `thrift/lib/cpp2/type/Any.h` module, enhancing the versatility of `toAny` for data handling. This ensures that callers migrating from `TypeRegistry::load` can seamlessly adopt `AnyData` without losing compatibility with existing SimpleJson data. | Mar 29 | 1 | grow |
| f4f1c5cf | This commit **regenerates** the `fboss/fsdb/if/oss/fsdb_model_thriftpath.h` header to address **stale type mappings** within the **FSDB model's Thrift path definitions**. This **maintenance update** synchronizes the C++ type definitions with recent upstream Thrift changes that removed `cpp.type` annotations. Specifically, it updates the `addr` field from `folly::fbstring` to `std::string` and the `flowId` field from `uint64_t` to `int64_t`, ensuring consistency and preventing potential compilation or runtime issues due to type mismatches. | Mar 27 | 1 | maint |
| 4cc016f6 | This commit delivers a **bug fix** for the **Hack code generator** within the Thrift compiler, addressing an issue where string constants containing dollar signs (`$`) were incorrectly generated. Specifically, it modifies the `render_string()` function in `t_hack_generator.cc` to **escape `$` characters as `\$`** before wrapping them in double quotes. This prevents unintended variable interpolation in Hack, ensuring that literal dollar signs are correctly represented in generated code. The change is **Hack-specific** and includes a new `dollar_string` constant in the test fixtures to validate the fix, thereby improving the **correctness of string constant representation** in generated Hack output. | Mar 27 | 27 | waste |
| f91f460c | This commit **updates the `orderable_type_utils_test.cc` file** within the **Thrift compiler's C++ generation tests**. It **refactors** the `typedef` declarations to use **structured annotations** for `cpp.Type`, replacing the previous unstructured format. This change represents a **maintenance improvement** for the test infrastructure, aligning `orderable_type_utils_test.cc` with modern annotation practices. The update enhances the consistency of annotation handling within this specific test, without impacting the compiler's generated code or runtime behavior. | Mar 27 | 1 | maint |
| f9cc7d41 | This commit **fixes a nondeterministic code generation bug** within the **Thrift Python generator** by ensuring a consistent iteration order for adapter modules. Specifically, it **sorts the elements** of `adapter_modules` and `adapter_type_hint_modules` in `t_mstch_python_generator.cc`, which were previously iterated nondeterministically from `std::unordered_set`. This **maintenance fix** resolves test failures, such as `test_adapter_python` on mac-arm64, caused by varying import orderings due to platform-specific hash implementations. The change guarantees **deterministic and consistent Python code generation** for adapters across all environments. | Mar 27 | 10 | maint |
| 27a8f184 | This commit primarily **fixes a regression in Java Thrift code generation** related to `binary_string` typedefs, ensuring they are correctly resolved to `ByteBuf` or `byte[]` based on field adapter context. It updates several **Java codegen templates** (`AdaptedBoxedType.mustache`, `Type.mustache`, `IntrinsicDefault.mustache`, `types.mustache`) to properly handle `isBinaryString?` checks and propagate adapter information for container elements, preventing incorrect type resolution. Additionally, it **migrates several Java runtime tests** (`RpcClientUtilsTest.java`, `RpcServerUtilsTest.java`) from JUnit 4 to **JUnit 5**, modernizing the test suite and updating assertion methods. This ensures generated Java code for binary types is correct and improves the maintainability of the test infrastructure. | Mar 26 | 7 | waste |
| af817e47 | This commit introduces **new helper functions**, `toStaticAny<Protocol, T>()` and `fromStaticAny<T>()`, within the **`thrift/conformance/cpp2/Any.h`** module. These functions provide a streamlined mechanism to **encode and decode compile-time-known types** to and from `conformance::Any` objects. The primary purpose is to **refactor** existing code by offering a direct replacement for `AnyRegistry::generated().store()` and `.load()` calls that deal with static types. This change **eliminates the dependency on `AnyRegistry` for static-type usages**, simplifying the interaction with `conformance::Any` and improving efficiency by bypassing runtime registration. | Mar 26 | 1 | grow |
| 5ec0acae | This commit performs a significant **refactoring** of **Thrift compiler test fixtures** by migrating all deprecated unstructured annotations in numerous `module.thrift` files to structured equivalents, often wrapping them in `@thrift.DeprecatedUnvalidatedAnnotations`. Concurrently, it removes the `allow_unstructured_annotations` flag from `fixture_utils.py` and updates `json_compiler_test.py` to reflect this change. This ensures that **Thrift fixture tests** now run with the default `forbid_unstructured_annotations = true` validation. The change aligns test behavior with **production environments**, enforcing stricter annotation validation and improving overall code quality and consistency within the **Thrift compiler test infrastructure**. | Mar 26 | 131 | maint |
| d1cba77c | This commit **enhances the Thrift compiler's Hack generator** by introducing support for the new `@hack.FixmeWrongType` and `@hack.UnsafeArray` annotations. This **new capability** allows the generator to automatically wrap generated Hack typehints with `\HH_FIXME\WRONG_TYPE<Type>` or transform array container types (e.g., `vec` to `varrayish_UNSAFE`), respectively. The core **typehint generation logic** in `thrift/compiler/generate/t_hack_generator.cc` has been updated with new helper functions to apply these transformations. This enables developers to generate Hack code that is more compatible with **legacy or less-strictly-typed Hack environments**, particularly for **array types** and **type-checking suppression**. | Mar 25 | 8 | grow |
| a3178cc4 | This commit introduces two **new structured annotations** to `hack.thrift`: `@hack.FixmeWrongType` and `@hack.UnsafeArray`, enhancing the **Thrift compiler's Hack codegen**. These **features** provide more granular control over **Hack type-checking suppression** and the generation of **unsafe array types** in generated code. Specifically, `FixmeWrongType` allows wrapping field types with `\HH_FIXME\WRONG_TYPE<Type>`, while `UnsafeArray` replaces `vec`/`dict` with `varrayish_UNSAFE`/`darrayish_UNSAFE`. This change will replace existing postprocess rules like `ThriftCodegenFixMePropertyRule`, offering a more declarative and integrated approach to managing these specific code generation behaviors. | Mar 25 | 65 | grow |
| 78479b27 | This commit **refactors** the application of `deprecated_terse_writes` in Thrift, migrating from a global `thrift_cpp2_options` setting to a **per-field `cpp.DeprecatedTerseWrite` structured annotation**. The **Carbon compiler** (`cppgen.py`, `targets.py`) was updated to automatically add this annotation to non-optional, non-structured fields in generated IDL files and remove the deprecated global option from `BUCK` files. This **maintenance** change improves granularity and aligns with preferred annotation practices for Thrift code generation. All 28 IDL files were regenerated to reflect this new, more precise control over terse writes, ensuring `deprecated_terse_writes` is managed at the field level. | Mar 24 | 1 | maint |
| 30d33ada | This commit provides a **bug fix** for the **Thrift Python compiler**'s service argument type generation. Previously, the `service_arg_types.mustache` template incorrectly resolved `IOBuf` return types by using `function.return_type.true_type`, which lost critical annotations after a recent change that removed annotation lowering. This led to `iobuf?` checks failing and `typeinfo_binary` being used instead of `typeinfo_iobuf` for `IOBuf` types. The fix involves updating the template to use `function.return_type` directly, ensuring that typedefs and their annotations are preserved for correct `IOBuf` handling in generated Python services. This change ensures proper serialization and deserialization of `IOBuf` in **generated Python Thrift services**. | Mar 24 | 1 | waste |
| 541cd65c | This commit **refactors** the **Thrift compiler's handling of `cpp.Type` annotations on typedefs**, eliminating the previous lowering mechanism in `sema.cc` that converted structured annotations to unstructured ones on the inner type. Instead, **C++ and Python generators** now directly resolve structured `@cpp.Type` annotations on the typedef node itself, updating logic in `name_resolver.h`, `name_resolver.cc`, and various generator files like `t_mstch_cpp2_generator.cc` and `t_mstch_py3_generator.cc`. This change also includes **critical bug fixes** for **Python 3 code generation**, addressing issues with `need_cbinding_path?` logic, incorrect Cython binding module paths for container typedefs, and `reference_shared_ptr` template argument ambiguity. The update ensures more consistent and accurate C++ type resolution across the compiler, particularly for typedefs, and improves the correctness of generated Python 3 code when custom C++ types are involved. | Mar 23 | 67 | maint |
This commit performs a **refactoring** within the **Thrift C++2 library**, specifically simplifying the `AnyData::toAny` function. It replaces complex, nested `std::conditional_t` logic used for selecting the appropriate protocol writer with the more streamlined `protocol::ProtocolWriterFor<Protocol>` helper. This change improves code readability and maintainability within the `thrift/lib/cpp2/type/Any.h` module. The core purpose is to enhance the internal implementation of `AnyData`'s serialization mechanism without altering existing functionality for **Binary, Compact, and SimpleJSON protocols**.
This commit **rolls out** the use of `op::encode` for C++ serialization within the **Thrift compiler**, aiming for **performance improvements** and **easier maintenance** compared to generated serialization code. The **Thrift compiler's C++ generator** (`t_mstch_cpp2_generator.cc`) is updated to identify structs eligible for `op::encode`, and the **C++ serialization templates** (`serialize_struct.mustache`) are modified to conditionally generate the optimized serialization calls. This **feature rollout** applies to structs that do not utilize `deprecated_terse_writes` or `cpp.lazy`, providing a significant **performance boost** for serialization in a majority of applicable cases.
This commit introduces a **performance optimization** and **refactoring** within **Thrift's `OpEncode` protocol implementation** to mitigate code bloat. It applies `FOLLY_NOINLINE` to the `Encode<type::i64_t>` operators in `thrift/lib/cpp2/op/detail/Encode.h`, preventing the large varint encoding logic for 64-bit integers from being inlined at every call site. This change addresses i-cache pressure and reduces binary size, leading to a **10% speedup** for `ComplexStruct` writes using `CompactProtocol`. The work also includes **comprehensive benchmark enhancements** to validate the optimal `NOINLINE` scope across various integer types and data structures.
This commit introduces a **significant refactoring** to the **Thrift Python3 generator** by enabling direct resolution of field-level `@cpp.Type` annotations. It adds new field-aware properties and caching mechanisms within `t_mstch_py3_generator.cc` and `cpp/util.cc`, allowing the generator to explicitly query `cpp.Type` information from the field rather than relying on type-level propagation. This change is further supported by the addition of numerous **field-aware template partials** across the Python3 templates, ensuring generated code correctly reflects these specific field annotations. This **maintenance** work is output-preserving and unblocks future simplifications by removing an indirect semantic lowering step, leading to a more robust and accurate code generation pipeline.
This commit implements a **performance optimization** to address a significant regression in the **`StructEncode`** mechanism, which previously suffered from non-inlined lambda calls during field iteration. The fix involves applying `FOLLY_ALWAYS_INLINE` to core field iteration utilities like `for_each_field_id` and `for_each_ordinal` in `thrift/lib/cpp2/op/Get.h`, and replacing intermediate lambdas with `FOLLY_ALWAYS_INLINE` functors within both the generic iteration infrastructure and the `StructEncode` implementation in `thrift/lib/cpp2/op/detail/Encode.h`. This change eliminates substantial per-field function call overhead, resulting in **performance improvements** of up to 12% for nested maps and 8% for complex structs during encoding. The **optimization** benefits all callers utilizing the `for_each_field_id` infrastructure with `FOLLY_ALWAYS_INLINE` functors, ensuring field writes are fully inlined.
This commit **refactors** the **Thrift Python generator** to directly check field-level `@cpp.Type` annotations, particularly for `IOBuf` types, within its code generation templates. It introduces new C++ utility overloads like `is_type_iobuf` and field-aware properties in `t_mstch_python_generator.cc` to enable this direct inspection. Numerous **Python code generation templates** are updated to utilize new partials such as `field_typeinfo` and `field_pep484_type`, which now handle `IOBuf` types directly at the field level. This change simplifies the type propagation logic by unblocking the removal of a semantic lowering step, representing a significant **internal improvement** without altering generated output.
This commit introduces a significant **refactoring** to the Thrift compiler's **parsing logic**, causing it to **reject unstructured annotations** (e.g., `(key = "value")`) at parse time. The `thrift/compiler/parse/parser.cc` module now immediately issues a parser error for such annotations, with the exception of `hs.*` annotations which are silently dropped. This change simplifies the compiler pipeline by shifting validation left, leading to the removal of related dead code in `thrift/compiler/sema/standard_validator.cc` and the deprecation of several compiler flags in `thrift/compiler/compiler.cc`. The **downstream impact** is that users will now receive clearer, earlier error messages for invalid annotation syntax, requiring updates to any Thrift IDL files still using the deprecated unstructured format.
This commit introduces **SimpleJson protocol support** to the `AnyData::get` and `AnyData::toAny` functions within the **Thrift C++2 library**. This **new capability** extends the `AnyData` utility, which previously only supported Binary and Compact protocols, to now properly serialize and deserialize data using SimpleJson. The change primarily affects the `thrift/lib/cpp2/type/Any.h` module, enhancing the versatility of `toAny` for data handling. This ensures that callers migrating from `TypeRegistry::load` can seamlessly adopt `AnyData` without losing compatibility with existing SimpleJson data.
This commit **regenerates** the `fboss/fsdb/if/oss/fsdb_model_thriftpath.h` header to address **stale type mappings** within the **FSDB model's Thrift path definitions**. This **maintenance update** synchronizes the C++ type definitions with recent upstream Thrift changes that removed `cpp.type` annotations. Specifically, it updates the `addr` field from `folly::fbstring` to `std::string` and the `flowId` field from `uint64_t` to `int64_t`, ensuring consistency and preventing potential compilation or runtime issues due to type mismatches.
This commit delivers a **bug fix** for the **Hack code generator** within the Thrift compiler, addressing an issue where string constants containing dollar signs (`$`) were incorrectly generated. Specifically, it modifies the `render_string()` function in `t_hack_generator.cc` to **escape `$` characters as `\$`** before wrapping them in double quotes. This prevents unintended variable interpolation in Hack, ensuring that literal dollar signs are correctly represented in generated code. The change is **Hack-specific** and includes a new `dollar_string` constant in the test fixtures to validate the fix, thereby improving the **correctness of string constant representation** in generated Hack output.
This commit **updates the `orderable_type_utils_test.cc` file** within the **Thrift compiler's C++ generation tests**. It **refactors** the `typedef` declarations to use **structured annotations** for `cpp.Type`, replacing the previous unstructured format. This change represents a **maintenance improvement** for the test infrastructure, aligning `orderable_type_utils_test.cc` with modern annotation practices. The update enhances the consistency of annotation handling within this specific test, without impacting the compiler's generated code or runtime behavior.
This commit **fixes a nondeterministic code generation bug** within the **Thrift Python generator** by ensuring a consistent iteration order for adapter modules. Specifically, it **sorts the elements** of `adapter_modules` and `adapter_type_hint_modules` in `t_mstch_python_generator.cc`, which were previously iterated nondeterministically from `std::unordered_set`. This **maintenance fix** resolves test failures, such as `test_adapter_python` on mac-arm64, caused by varying import orderings due to platform-specific hash implementations. The change guarantees **deterministic and consistent Python code generation** for adapters across all environments.
This commit primarily **fixes a regression in Java Thrift code generation** related to `binary_string` typedefs, ensuring they are correctly resolved to `ByteBuf` or `byte[]` based on field adapter context. It updates several **Java codegen templates** (`AdaptedBoxedType.mustache`, `Type.mustache`, `IntrinsicDefault.mustache`, `types.mustache`) to properly handle `isBinaryString?` checks and propagate adapter information for container elements, preventing incorrect type resolution. Additionally, it **migrates several Java runtime tests** (`RpcClientUtilsTest.java`, `RpcServerUtilsTest.java`) from JUnit 4 to **JUnit 5**, modernizing the test suite and updating assertion methods. This ensures generated Java code for binary types is correct and improves the maintainability of the test infrastructure.
This commit introduces **new helper functions**, `toStaticAny<Protocol, T>()` and `fromStaticAny<T>()`, within the **`thrift/conformance/cpp2/Any.h`** module. These functions provide a streamlined mechanism to **encode and decode compile-time-known types** to and from `conformance::Any` objects. The primary purpose is to **refactor** existing code by offering a direct replacement for `AnyRegistry::generated().store()` and `.load()` calls that deal with static types. This change **eliminates the dependency on `AnyRegistry` for static-type usages**, simplifying the interaction with `conformance::Any` and improving efficiency by bypassing runtime registration.
This commit performs a significant **refactoring** of **Thrift compiler test fixtures** by migrating all deprecated unstructured annotations in numerous `module.thrift` files to structured equivalents, often wrapping them in `@thrift.DeprecatedUnvalidatedAnnotations`. Concurrently, it removes the `allow_unstructured_annotations` flag from `fixture_utils.py` and updates `json_compiler_test.py` to reflect this change. This ensures that **Thrift fixture tests** now run with the default `forbid_unstructured_annotations = true` validation. The change aligns test behavior with **production environments**, enforcing stricter annotation validation and improving overall code quality and consistency within the **Thrift compiler test infrastructure**.
This commit **enhances the Thrift compiler's Hack generator** by introducing support for the new `@hack.FixmeWrongType` and `@hack.UnsafeArray` annotations. This **new capability** allows the generator to automatically wrap generated Hack typehints with `\HH_FIXME\WRONG_TYPE<Type>` or transform array container types (e.g., `vec` to `varrayish_UNSAFE`), respectively. The core **typehint generation logic** in `thrift/compiler/generate/t_hack_generator.cc` has been updated with new helper functions to apply these transformations. This enables developers to generate Hack code that is more compatible with **legacy or less-strictly-typed Hack environments**, particularly for **array types** and **type-checking suppression**.
This commit introduces two **new structured annotations** to `hack.thrift`: `@hack.FixmeWrongType` and `@hack.UnsafeArray`, enhancing the **Thrift compiler's Hack codegen**. These **features** provide more granular control over **Hack type-checking suppression** and the generation of **unsafe array types** in generated code. Specifically, `FixmeWrongType` allows wrapping field types with `\HH_FIXME\WRONG_TYPE<Type>`, while `UnsafeArray` replaces `vec`/`dict` with `varrayish_UNSAFE`/`darrayish_UNSAFE`. This change will replace existing postprocess rules like `ThriftCodegenFixMePropertyRule`, offering a more declarative and integrated approach to managing these specific code generation behaviors.
This commit **refactors** the application of `deprecated_terse_writes` in Thrift, migrating from a global `thrift_cpp2_options` setting to a **per-field `cpp.DeprecatedTerseWrite` structured annotation**. The **Carbon compiler** (`cppgen.py`, `targets.py`) was updated to automatically add this annotation to non-optional, non-structured fields in generated IDL files and remove the deprecated global option from `BUCK` files. This **maintenance** change improves granularity and aligns with preferred annotation practices for Thrift code generation. All 28 IDL files were regenerated to reflect this new, more precise control over terse writes, ensuring `deprecated_terse_writes` is managed at the field level.
This commit provides a **bug fix** for the **Thrift Python compiler**'s service argument type generation. Previously, the `service_arg_types.mustache` template incorrectly resolved `IOBuf` return types by using `function.return_type.true_type`, which lost critical annotations after a recent change that removed annotation lowering. This led to `iobuf?` checks failing and `typeinfo_binary` being used instead of `typeinfo_iobuf` for `IOBuf` types. The fix involves updating the template to use `function.return_type` directly, ensuring that typedefs and their annotations are preserved for correct `IOBuf` handling in generated Python services. This change ensures proper serialization and deserialization of `IOBuf` in **generated Python Thrift services**.
This commit **refactors** the **Thrift compiler's handling of `cpp.Type` annotations on typedefs**, eliminating the previous lowering mechanism in `sema.cc` that converted structured annotations to unstructured ones on the inner type. Instead, **C++ and Python generators** now directly resolve structured `@cpp.Type` annotations on the typedef node itself, updating logic in `name_resolver.h`, `name_resolver.cc`, and various generator files like `t_mstch_cpp2_generator.cc` and `t_mstch_py3_generator.cc`. This change also includes **critical bug fixes** for **Python 3 code generation**, addressing issues with `need_cbinding_path?` logic, incorrect Cython binding module paths for container typedefs, and `reference_shared_ptr` template argument ambiguity. The update ensures more consistent and accurate C++ type resolution across the compiler, particularly for typedefs, and improves the correctness of generated Python 3 code when custom C++ types are involved.