slachiewicz commented on PR #3812:
URL: https://github.com/apache/thrift/pull/3812#issuecomment-5589410230

   That holds for base types, and this PR leaves them alone. The alias is gated 
on `is_struct() || is_xception()` — `typedef i64 TimestampMilliseconds` still 
generates `type TimestampMilliseconds int64`, so the explicit cast at the call 
site stays. In the 325-file regeneration, every line that moved is a 
typedef-of-struct declaration.
   
   Structs have no equivalent enforcement to lose. `type Alias *Inner` is 
nominally distinct but carries no method set, and the generated read path calls 
`Read` on it, so a typedef of a struct the IDL actually uses does not compile — 
THRIFT-3037, THRIFT-3491, THRIFT-4901. Keeping it nominal would mean `type 
Alias Inner` plus generated `Read`, `Write`, `Equals`, `String` and every 
getter, and `*Alias` would still not satisfy a signature naming `*Inner`, 
including the service methods the compiler writes for it.
   
   Do you have a pointer to the earlier discussion? I could not find it on the 
tracker. If it covered typedef-of-struct specifically rather than typedefs in 
general, I would like to read it before pushing this further.
   
   *This comment was created with AI assistance.*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to