[ 
https://issues.apache.org/jira/browse/THRIFT-2389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jake Farrell closed THRIFT-2389.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 0.9.2
         Assignee: dima levchenko

Committed, thanks for the patch

> namespaces handled wrongly in acrionscript 3.0 implementation
> -------------------------------------------------------------
>
>                 Key: THRIFT-2389
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2389
>             Project: Thrift
>          Issue Type: Bug
>          Components: AS3 - Compiler
>            Reporter: dima levchenko
>            Assignee: dima levchenko
>            Priority: Minor
>             Fix For: 0.9.2
>
>         Attachments: 
> THRIFT-2389-namespaces-handled-wrongly-in-actionscript-implementation.patch
>
>
> 1. if no namespace declared for thrift file - no package declaration is 
> created in generated source files. this leads to compilation time error. 
> should be empty package declaration.
> 2. when extending other service with namespace, generated source extend fully 
> qualified parent service, which is compilation time error (at least for 
> apache flex 4.9 compiler). should be generated proper import, and simple 
> extends declaration.
> Both of these issues can be observed, using tutorial example files, with 
> minor changes to shared.thrift file. adding namespace declaration in 
> shared.thrift, we can see generated actionscript file:
> {code:title=Calculator.as}
> /**
>  * Autogenerated by Thrift Compiler (0.9.1)
>  *
>  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
>  *  @generated
>  */
> {
> import org.apache.thrift.Set;
> import flash.utils.ByteArray;
> import flash.utils.Dictionary;
> import org.apache.thrift.*;
> import org.apache.thrift.meta_data.*;
> import org.apache.thrift.protocol.*;
>   /**
>    * Ahh, now onto the cool part, defining a service. Services just need a 
> name
>    * and can optionally inherit from another service using the extends 
> keyword.
>    */
>   public interface Calculator extends shared.SharedService {
> {code}
> which should look like:
> {code:title=Calculator.as}
> /**
>  * Autogenerated by Thrift Compiler (0.9.1)
>  *
>  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
>  *  @generated
>  */
> package {
> import org.apache.thrift.Set;
> import flash.utils.ByteArray;
> import flash.utils.Dictionary;
> import org.apache.thrift.*;
> import org.apache.thrift.meta_data.*;
> import org.apache.thrift.protocol.*;
> import shared.SharedService;
>   /**
>    * Ahh, now onto the cool part, defining a service. Services just need a 
> name
>    * and can optionally inherit from another service using the extends 
> keyword.
>    */
>   public interface Calculator extends SharedService {
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to