Commit eac5766
Add Hack NamePrefix support
Summary: Add a new `hack.NamePrefix` structured annotation that allows Thrift definitions to prepend a configurable prefix to generated Hack type names. This enables namespace-like disambiguation for generated Hack code without renaming every type individually via `hack.Name`. The annotation supports both program-level and per-definition scoping, with an `apply_on_getName` flag to control whether the prefix also affects the `getName()` return value. The Hack code generator is updated to apply these prefixes during type name resolution.
Reviewed By: rmakheja
Differential Revision: D101434629
fbshipit-source-id: d22f4883a33003d7ec768c4fa187b5f06a1c161f1 parent 5e9ed09 commit eac5766
1 file changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
122 | 143 | | |
123 | 144 | | |
124 | 145 | | |
| |||
0 commit comments