You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "dima levchenko (JIRA)" <ji...@apache.org> on 2014/03/06 13:22:43 UTC

[jira] [Created] (THRIFT-2389) namespaces handled handled wrong in acrionscript 3.0 implementation

dima levchenko created THRIFT-2389:
--------------------------------------

             Summary: namespaces handled handled wrong 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
            Priority: Minor


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)