Skip to content

Commit

Permalink
Add @cpp.AllowLegacyDeprecatedTerseWritesRef to allow using cpp.Ref w…
Browse files Browse the repository at this point in the history
…ith deprecated_terse_writes cpp2 option

Summary: We will ban such usages without this annotation.

Reviewed By: thedavekwon

Differential Revision: D68802575

fbshipit-source-id: 16a60085e3951f0f3ce64e46040d210b9ef93cc9
  • Loading branch information
TJ Yin authored and facebook-github-bot committed Jan 30, 2025
1 parent 70264f7 commit baff648
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions thrift/annotation/cpp.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -403,3 +403,13 @@ struct AllowLegacyNonOptionalRef {}
*/
@scope.Field
struct DeprecatedTerseWrite {}

/**
* Allows the field to be annotated @cpp.Ref (or cpp[2].ref[_type]) even if it
* is deprecated_terse_writes field.
*
* This annotation is provided for a limited time, to exempt pre-existing fields
* while rolling out a stricter enforcement of the condition above.
*/
@scope.Field
struct AllowLegacyDeprecatedTerseWritesRef {}

0 comments on commit baff648

Please sign in to comment.