-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42748/#review116653
-----------------------------------------------------------



A few notes for reviewers.


buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/ThriftAnnotation.java 
(line 25)
<https://reviews.apache.org/r/42748/#comment177719>

    NB: Immutables is used here to generate the equivalent of Names.named(...) 
from guice since it provides that capability for annotation types and AutoValue 
does not (yet).  Furthermore, Immutables is not used for thrift Struct gen 
since it does not handle @Nullable fields gracefully and thrift forces these on 
us of all fields marked optional and with no mark (thrift fields can be 
optional, required or unqualified, which are also fapp optional).



buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/ThriftFields.java 
(line 42)
<https://reviews.apache.org/r/42748/#comment177720>

    MesosContainer forced this handling - it has no fields.



buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/ThriftStruct.java 
(line 34)
<https://reviews.apache.org/r/42748/#comment177722>

    NB: actual generated structs have a no-arg `builder()` method - this is 
just for reflective applications.



buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/ThriftStruct.java 
(line 66)
<https://reviews.apache.org/r/42748/#comment177721>

    NB: Likewise, generated Builders are richer, offering a setXXX per concrete 
struct field in addition to this generic means of setting a field.



buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/ThriftUnion.java 
(line 40)
<https://reviews.apache.org/r/42748/#comment177723>

    Similar to structs, unions have a static factory method named after each 
field - this method is just for reflective applications.


- John Sirois


On Jan. 26, 2016, 10:16 p.m., John Sirois wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42748/
> -----------------------------------------------------------
> 
> (Updated Jan. 26, 2016, 10:16 p.m.)
> 
> 
> Review request for Aurora, Bill Farner and Zameer Manji.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This generator emits immutable objects and carries over thrift
> annotations to java annotations for both subsequent build-time
> code generation via annotation processors and for runtime use
> in interceptors and other reflective tools.
> 
>  .gitignore                                                                   
>                                       |   3 +
>  build.gradle                                                                 
>                                       |  47 ++-
>  buildSrc/build.gradle                                                        
>                                       |  61 ++++
>  settings.gradle => buildSrc/settings.gradle                                  
>                                       |   3 +-
>  
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/ThriftAnnotation.java
>                                     |  45 +++
>  
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/ThriftAnnotations.java
>                                    |  38 +++
>  buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/ThriftEntity.java  
>                                       |  70 ++++
>  buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/ThriftFields.java  
>                                       |  65 ++++
>  buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/ThriftService.java 
>                                       |  43 +++
>  buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/ThriftStruct.java  
>                                       |  80 +++++
>  buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/ThriftUnion.java   
>                                       |  76 +++++
>  
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/AbstractStructRenderer.java
>                         | 132 ++++++++
>  
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/BaseEmitter.java
>                                    | 143 +++++++++
>  
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/BaseVisitor.java
>                                    | 533 +++++++++++++++++++++++++++++++
>  
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/ConstVisitor.java
>                                   |  72 +++++
>  
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/IntegerEnumVisitor.java
>                             | 102 ++++++
>  buildSrc/{build.gradle => 
> thriftGen/src/main/java/org/apache/aurora/thrift/build/ParseException.java}   
>            |  15 +-
>  
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/ServiceVisitor.java
>                                 | 279 ++++++++++++++++
>  
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/StructVisitor.java
>                                  | 619 +++++++++++++++++++++++++++++++++++
>  
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/SymbolTable.java
>                                    | 180 +++++++++++
>  
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/ThriftGen.java
>                                      | 190 +++++++++++
>  
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/ThriftGenVisitor.java
>                               | 122 +++++++
>  buildSrc/{build.gradle => 
> thriftGen/src/main/java/org/apache/aurora/thrift/build/UnexpectedTypeException.java}
>      |  13 +-
>  
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/UnionVisitor.java
>                                   | 254 +++++++++++++++
>  buildSrc/{build.gradle => 
> thriftGen/src/main/java/org/apache/aurora/thrift/build/UnsupportedFeatureException.java}
>  |  12 +-
>  buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/Visitor.java 
>                                       |  95 ++++++
>  
> buildSrc/thriftGen/src/test/java/org/apache/aurora/thrift/build/ThriftGenTest.java
>                                  | 869 
> ++++++++++++++++++++++++++++++++++++++++++++++++++
>  settings.gradle                                                              
>                                       |   2 +-
>  28 files changed, 4127 insertions(+), 36 deletions(-)
> 
> 
> Diffs
> -----
> 
>   .gitignore 1af09a251b3f76c13813033d32aa7efba9aef304 
>   build.gradle 5b9e0152bfe3fe1f304fa839cfc4cec646819c2e 
>   buildSrc/build.gradle e3d6debf1959ec2c50970c317b59a04a2d9c1f82 
>   buildSrc/settings.gradle PRE-CREATION 
>   
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/ThriftAnnotation.java
>  PRE-CREATION 
>   
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/ThriftAnnotations.java
>  PRE-CREATION 
>   buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/ThriftEntity.java 
> PRE-CREATION 
>   buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/ThriftFields.java 
> PRE-CREATION 
>   
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/ThriftService.java 
> PRE-CREATION 
>   buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/ThriftStruct.java 
> PRE-CREATION 
>   buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/ThriftUnion.java 
> PRE-CREATION 
>   
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/AbstractStructRenderer.java
>  PRE-CREATION 
>   
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/BaseEmitter.java
>  PRE-CREATION 
>   
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/BaseVisitor.java
>  PRE-CREATION 
>   
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/ConstVisitor.java
>  PRE-CREATION 
>   
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/IntegerEnumVisitor.java
>  PRE-CREATION 
>   
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/ParseException.java
>  PRE-CREATION 
>   
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/ServiceVisitor.java
>  PRE-CREATION 
>   
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/StructVisitor.java
>  PRE-CREATION 
>   
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/SymbolTable.java
>  PRE-CREATION 
>   
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/ThriftGen.java
>  PRE-CREATION 
>   
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/ThriftGenVisitor.java
>  PRE-CREATION 
>   
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/UnexpectedTypeException.java
>  PRE-CREATION 
>   
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/UnionVisitor.java
>  PRE-CREATION 
>   
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/UnsupportedFeatureException.java
>  PRE-CREATION 
>   
> buildSrc/thriftGen/src/main/java/org/apache/aurora/thrift/build/Visitor.java 
> PRE-CREATION 
>   
> buildSrc/thriftGen/src/test/java/org/apache/aurora/thrift/build/ThriftGenTest.java
>  PRE-CREATION 
>   settings.gradle b097e2fd958fa0ce6076fc104eb3890c4029295d 
> 
> Diff: https://reviews.apache.org/r/42748/diff/
> 
> 
> Testing
> -------
> 
> Locally green: `./gradlew -Pq test`
> 
> 
> Thanks,
> 
> John Sirois
> 
>

Reply via email to