Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Patch Available
Description
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:
/** * 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 {
which should look like:
/** * 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 {
Attachments
Attachments
Issue Links
- blocks
-
THRIFT-2392 Actionscript tutorial
- Closed