Skip to content

Commit 3eb8127

Browse files
iahsmeta-codesync[bot]
authored andcommitted
Remove move-only adapter support
Summary: `cpp.Adapter.moveOnly` no longer affects C++ code generation, and every production use was attached to a copyable adapted type. Remove the annotation field, stale annotations, move-only fixtures, and regenerate affected fixture outputs. Field ID 5 remains unreserved so existing serialized annotation payloads continue to decode without unknown-field enforcement. Keep the existing arithmetic `serializedSizeFixed` adapter-size support unchanged. The Configerator-owned Metarmor source change is D116658723 and must land first. Reviewed By: hchokshi Differential Revision: D116659189 fbshipit-source-id: 93fe5691c8c85f9ab30f1e68d840cac3d15e6433
1 parent 5ebfec1 commit 3eb8127

2 files changed

Lines changed: 0 additions & 21 deletions

File tree

exactprint/tests/fbthrift-tests/adapter/src/module.thrift

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -547,21 +547,6 @@ struct SameNamespaceStruct {
547547
1: i64 data;
548548
}
549549

550-
@cpp.Adapter{name = "::apache::thrift::test::MoveOnlyAdapter", moveOnly = true}
551-
struct HeapAllocated {}
552-
553-
struct MoveOnly {
554-
1: HeapAllocated ptr;
555-
}
556-
557-
struct AlsoMoveOnly {
558-
@cpp.Adapter{
559-
name = "::apache::thrift::test::MoveOnlyAdapter",
560-
moveOnly = true,
561-
}
562-
1: i64 ptr;
563-
}
564-
565550
@cpp.Adapter{name = "::apache::thrift::test::TemplatedTestAdapter"}
566551
@scope.Transitive
567552
struct ApplyAdapter {}
@@ -584,7 +569,6 @@ struct CountingStruct {
584569

585570
service AdapterService {
586571
CountingStruct count();
587-
HeapAllocated adaptedTypes(1: HeapAllocated arg);
588572
}
589573

590574
@cpp.Adapter{name = "::apache::thrift::test::VariableAdapter"}
@@ -617,8 +601,6 @@ const Person2 person_no_transitive = Person2{name = "DefaultName 2"};
617601

618602
const AdaptedBool type_adapted = true;
619603

620-
const MoveOnly nested_adapted = {"ptr": {}};
621-
622604
const list<AdaptedByte> container_of_adapted = [1, 2, 3];
623605

624606
// The following were automatically generated and may benefit from renaming.

thrift/annotation/cpp.thrift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,6 @@ struct Adapter {
176176
*/
177177
3: string underlyingName;
178178
4: string extraNamespace;
179-
180-
/** Must set to true when adapted type is not copyable. */
181-
5: bool moveOnly;
182179
}
183180

184181
/**

0 commit comments

Comments
 (0)