jonny91 / protoc-gen-as3 Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/protoc-gen-as3
License: BSD 2-Clause "Simplified" License
Automatically exported from code.google.com/p/protoc-gen-as3
License: BSD 2-Clause "Simplified" License
协议内容如下:
message C10001{
required string account = 1;
required bytes password = 2;
}
用 as3crypto 的 sha256 对 password
进行处理后进行字用protoc-gen-as3串化,打印出来发现跟C++生成
的二进制数据有一位不一样,目前分析Sha256后的数据两种语��
�是一直的,说以不知道问题是不是出现在串化过程中
两种语言串化的二进制数据如下(不包含括号,括号是我加��
�去突出不同的那个位置的)
AS3:6433130303031a561646d696e1220ba7816bf8f1cfea414140de5dae2223b0361a396177a9cb
410ff61f2
C++:6433130303031a561646d696e121dba7816bf8f1cfea414140de5dae2223b0361a396177a9cb
410ff61f2
AS的代码如下:
import com.hurlant.crypto.Crypto;
import com.hurlant.crypto.hash.IHash;
import com.hurlant.util.Hex;
import com.netease.protobuf.*;
import msg.*;
private function CK():void{
var hash:IHash = Crypto.getHash("sha256");
var data1:ByteArray = Hex.toArray(Hex.fromString("abc"));
var msgA:C10001 = new C10001();
msgA.account = "admin";
msgA.password = hash.hash(data1);
var cN:String = getQualifiedClassName(msgA);
cN=cN.substr(cN.lastIndexOf(':')+1);
var data:ByteArray = new ByteArray();
data.writeByte(cN.length);
data.writeUTFBytes(cN);
msgA.writeTo(data);
var code:String = "";
for(var i:int=0; i < data.length; i++){
code += data[i].toString(16);
}
trace(code);
}
Original issue reported on code.google.com by [email protected]
on 23 May 2012 at 6:18
In com.netease.protocGenAs3.Main.java, there are a couple AssertionErrors that
are thrown with both a String and an Exception. The AssertionError(String,
Throwable) constructor is not available in Java 6 and below.
Removing the exception argument will allow compilation on Java6 and earlier.
Original issue reported on code.google.com by [email protected]
on 16 Jan 2013 at 11:13
What steps will reproduce the problem?
1. download and build the 2.3.1 repo of protoc
2. download and extract protoc-gen-as3-0.8rc2-bin.tar.gz
3. run protoc with the following command line:
/home/orion/sandbox/orion/pb2.3.0/linux/bin/protoc --plugin=protoc-gen-
as3=/home/orion/sandbox/orion/pb2.3.0/protoc-gen-as3/dist/protoc-gen-as3
--as3_out
foo ./xs1.proto
(full paths included in case i'm doing something dumb)
What is the expected output? What do you see instead?
the result is the following error:
-----------------
/home/orion/sandbox/orion/pb2.3.0/protoc-gen-as3/dist/protoc-gen-as3: program
not
found or is not executable
--as3_out: protoc-gen-as3: Plugin failed with status code 1.
-----------------
if i remove "-e" from the first line of protoc-gen-as3,
then the error changes to:
-----------------
Exception in thread "main" java.lang.NoClassDefFoundError:
com/netease/protocGenAs3/Main
Caused by: java.lang.ClassNotFoundException: com.netease.protocGenAs3.Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
Could not find the main class: com/netease/protocGenAs3/Main. Program will exit.
--as3_out: protoc-gen-as3: Plugin failed with status code 1.
-----------------
What version of the product are you using? On what operating system?
these results are consistent on OS X (snow leopard) and on a centos linux box:
Linux version 2.6.18-164.6.1.el5 ([email protected])
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 19 Jan 2010 at 10:37
目前看到的 rpc
实现基本上都传递方法名给另一端进行函数查找,当跨语言��
�时候,as3 发过去的是首字母小写的骆驼风格,C++/Python
的则是没有经过处理的,所以无法查找到相应的方法。
建议不要修改 rpc
的函数名,业务开发人员怎么写的,就怎么用,类似 message
名的处理方法。在这方面,protobuf 的 style guide 也提出 rpc
名应统一使用首字母大写的驼峰法。见
https://developers.google.com/protocol-buffers/docs/style?hl=zh-CN
Original issue reported on code.google.com by [email protected]
on 17 Apr 2012 at 8:12
The Makefile currently targets Flash Player 10, which I don't think is
available/supported anymore (my copy of the Flex SDK 4.6 doesn't contain
support for it).
I updated my Makefile to target Flash Player 11 to get things compiling again
Original issue reported on code.google.com by [email protected]
on 12 Feb 2013 at 3:32
Is there any reason that generated classes are "public final dynamic class"
rather than just "public final class"? The dynamic keyword essentially turns
off type-checking in the as3 compiler, which makes working with protobuf
objects more error-prone.
Original issue reported on code.google.com by [email protected]
on 10 May 2013 at 9:37
生成的as3代码中在writeToBuffer
里面经常会看到类似的情况:
for (var heros$index:uint = 0; heros$index < this.heros.length; ++heros$index) {
-》》
for (var heros$index:uint = 0,len:uint= this.heros.length; heros$index <len;
++heros$index) {
虽然不是很关键,但是看着总是觉得应该优化一下,希望你��
�时间时参考以下,谢谢⋯⋯
Original issue reported on code.google.com by [email protected]
on 1 Feb 2012 at 4:38
Thanks a lot for the library. It is very useful.
com.netease.protobuf.Message class changes the input's endian attribute when
reading data.
I think it should be restored. I have had problems reading from a socket. I was
reading data encoding with protobuf but also unencoded data. The first
socket.readShort() was correct but the next, after reading a protobuf chunk,
were wrong. I solved it setting back the endian attr to
flash.utils.Endian.BIG_ENDIAN but I'd prefer that the library didn't interfere.
ACTUAL CODE:
public final function mergeFrom(input:IDataInput):void {
input.endian = flash.utils.Endian.LITTLE_ENDIAN
readFromSlice(input, 0)
}
public final function mergeDelimitedFrom(input:IDataInput):void {
input.endian = flash.utils.Endian.LITTLE_ENDIAN
ReadUtils.read$TYPE_MESSAGE(input, this)
}
PROPOSED CODE:
public final function mergeFrom(input:IDataInput):void {
const endian:String = input.endian
input.endian = flash.utils.Endian.LITTLE_ENDIAN
readFromSlice(input, 0)
input.endian = endian
}
public final function mergeDelimitedFrom(input:IDataInput):void {
const endian:String = input.endian
input.endian = flash.utils.Endian.LITTLE_ENDIAN
ReadUtils.read$TYPE_MESSAGE(input, this)
input.endian = endian
}
Original issue reported on code.google.com by [email protected]
on 6 Nov 2011 at 11:06
the build is currently broken:
make: *** No rule to make target `tiny-protobuf.swc', needed by
`dist/protobuf.swc'. Stop.
Original issue reported on code.google.com by [email protected]
on 16 Jan 2013 at 11:28
Translate wiki pages to English
Original issue reported on code.google.com by [email protected]
on 13 Jan 2010 at 2:38
What steps will reproduce the problem?
1. create a proto with a field called 'tag' and type string
2. run protoc
3. try to compile the code
What is the expected output? What do you see instead?
Should compile, instead complains that tag is a string and cannot assign int to
string (local variable tag conflicts with class variable 'tag' from the proto)
What version of the product are you using? On what operating system?
0.9.1 - but i see the code is unchanged in 1.0 RC.
Please provide any additional information below.
Please simply rename the local variable in the readFromSlice() method to
something unique to prevent these conflicts.
Original issue reported on code.google.com by [email protected]
on 25 Aug 2011 at 2:36
What steps will reproduce the problem?
1. Have a protocol with a message containing one int32
2. Send one such message with a negative value for the int, for instance
the Java implementation
3. Try to decode it in AS3
What is the expected output? What do you see instead?
The message should be properly decoded (int32 is allowed to take negative
values) but crashes the lib instead. This seems to come from the assumption
that int32 are positive made by the lib. I'm looking into fixing it, but
feedback would be welcome.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 9 Feb 2010 at 4:26
如题
Original issue reported on code.google.com by [email protected]
on 28 Jan 2010 at 12:21
Currently optinal or required fields may be watched using data bindings. This
does not work for repeated (array) fields, since arrays send no events.
A solution for this would be a field option "as3_array_collection":
repeated int32 foo = 1 [(as3_array_collection) = true];
This option changes the type of the repeated field to ArrayCollection.
This enables the use of the field in a data binding as source for e.g. a spark
list, that will update as soon as the field on the message is changed.
Original issue reported on code.google.com by [email protected]
on 12 Jul 2011 at 9:41
This is a deprecated feature, but I still need to implement it for compatible.
Original issue reported on code.google.com by [email protected]
on 15 Jan 2010 at 3:33
在学习您的类库的时候发现传给服务器的浮点数 和
接收到的浮点数最后几位不一样。100%出现。
Original issue reported on code.google.com by starlizhi
on 23 Jan 2013 at 1:47
Branch name:
Purpose of code changes on this branch:
When reviewing my code changes, please focus on:
After the review, I'll merge this branch into:
/trunk
Original issue reported on code.google.com by [email protected]
on 26 Feb 2014 at 3:14
Hello,
I'm not reporting a bug issue here. I'm just curious about two compilation
warnings reported by Flash Builder 4.6. I get those warnings on the as3 classes
I generated through protoc-gen-as3. However my Flash Builder project compiles &
runs perfectly fine (serialization & deserialization works).
Here are the two warnings (see attached RequestHeader.as file):
* first one is on the following line:
import com.netease.protobuf.fieldDescriptors.*;
it says "the import fieldDescriptors could not be found"
* second one is on the following line:
public static const REQUESTID:FieldDescriptor$TYPE_INT32 = new FieldDescriptor$TYPE_INT32
it says "type was not found or was not a compile-time constant: FieldDescriptor$TYPE_INT32"
My Question:
com.netease.protobuf.fieldDescriptors package doesn't exist inside
protobuf.swc. Could you please explain to me what are those both warnings ? Are
they perfectly normals ?
What steps will reproduce the problem?
1. generate as3 classes from the attached sample.proto file
2. Create a new Flash Builder project (AIR project in my case)
3. Add the as3 classes generated from sample.proto to the newly created Flash
Builder project
4. Add the protoc-gen-as3 library (protobuf.swc) to the Referenced Libraries of
the Flash Builder project
What version of the product are you using? On what operating system?
protoc-gen-as3 3.1.0.0-rc9
Flash Builder 4.6
Windows Vista Integral Edition SP2 x64
Best Regards,
--Seb
Original issue reported on code.google.com by [email protected]
on 7 Mar 2012 at 10:39
Attachments:
Lets say you have a protobuf:
message Person {
optional string name = 1;
}
Inside the Person AS3 file you'll have:
private var name_:int;
private var hasName_:Boolean = false;
public function get hasName():Boolean {
return hasName_;
}
public function set name(value:String):void {
hasName_ = true;
name_ = value;
}
public function get name():String {
return name_;
}
My proposition is to add another method:
public function removeName():void {
hasName_ = false;
name_ = null;
}
Which would be handled like expected in writeToBuffer():
if (hasName) {
WriteUtils.writeTag(output, WireType.LENGTH_DELIMITED, 1);
WriteUtils.write_TYPE_STRING(output, name);
}
Doing 'person.name = null' simply sets name to null. It doesn't set hasName to
false.
Original issue reported on code.google.com by william.bowers
on 24 Sep 2010 at 2:16
What steps will reproduce the problem?
1. Create [.proto] file.
message DoubleFloat {
optional double myDouble = 1;
optional float myFloat = 2;
}
2. Run this program.
var values:DoubleFloat = new DoubleFloat();
values.myDouble = 1.0;
values.myFloat = 1.0;
var bytes:ByteArray = new ByteArray();
values.writeTo(bytes);
trace(bytes[0].toString(16)); // 09 -- correct
trace(bytes[1].toString(16)); // 00 -- correct
trace(bytes[2].toString(16)); // 00 -- correct
trace(bytes[3].toString(16)); // 00 -- correct
trace(bytes[4].toString(16)); // 00 -- correct
trace(bytes[5].toString(16)); // 00 -- correct
trace(bytes[6].toString(16)); // 00 -- correct
trace(bytes[7].toString(16)); // F0 -- correct
trace(bytes[8].toString(16)); // 3F -- correct
trace(bytes[9].toString(16)); // 15 -- correct
trace(bytes[10].toString(16)); // 00 -- correct
trace(bytes[11].toString(16)); // 00 -- correct
trace(bytes[12].toString(16)); // 80 -- correct
trace(bytes[13].toString(16)); // 3F -- correct
bytes.position = 0;
var loaded:DoubleFloat = new DoubleFloat();
loaded.readFromSlice(bytes, 0);
bytes.clear()
loaded.writeTo(bytes);
trace(bytes[0].toString(16)); // 09 -- correct
trace(bytes[1].toString(16)); // 3F -- wrong(It is big endian!)
trace(bytes[2].toString(16)); // F0 -- wrong(It is big endian!)
trace(bytes[3].toString(16)); // 00 -- correct
trace(bytes[4].toString(16)); // 00 -- correct
trace(bytes[5].toString(16)); // 00 -- correct
trace(bytes[6].toString(16)); // 00 -- correct
trace(bytes[7].toString(16)); // 00 -- wrong(It is big endian!)
trace(bytes[8].toString(16)); // 00 -- wrong(It is big endian!)
trace(bytes[9].toString(16)); // 15 -- correct
trace(bytes[10].toString(16)); // 3F -- wrong(It is big endian!)
trace(bytes[11].toString(16)); // 80 -- wrong(It is big endian!)
trace(bytes[12].toString(16)); // 00 -- wrong(It is big endian!)
trace(bytes[13].toString(16)); // 00 -- wrong(It is big endian!)
bytes.position = 0;
var loaded2:DoubleFloat = new DoubleFloat();
loaded2.readFromSlice(bytes, 0);
bytes.clear()
loaded2.writeTo(bytes);
trace(bytes[0].toString(16)); // 09 -- correct
trace(bytes[1].toString(16)); // 00 -- correct
trace(bytes[2].toString(16)); // 00 -- correct
trace(bytes[3].toString(16)); // 00 -- correct
trace(bytes[4].toString(16)); // 00 -- correct
trace(bytes[5].toString(16)); // 00 -- correct
trace(bytes[6].toString(16)); // 00 -- correct
trace(bytes[7].toString(16)); // F0 -- correct
trace(bytes[8].toString(16)); // 3F -- correct
trace(bytes[9].toString(16)); // 15 -- correct
trace(bytes[10].toString(16)); // 00 -- correct
trace(bytes[11].toString(16)); // 00 -- correct
trace(bytes[12].toString(16)); // 80 -- correct
trace(bytes[13].toString(16)); // 3F -- correct
What is the expected output? What do you see instead?
The ByteArray should keep same values anytime.
What version of the product are you using? On what operating system?
1.0.0-rc6
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 6 Feb 2012 at 11:00
What steps will reproduce the problem?
1. client & server have the same protocol.
2. 1 new token added to enum. server updated to use new protocol.
3. server send message to the client(with old api) with value set to new token
from enum.
4. IOError(value + " is invalid for " + enumTypeDescription.@name) thrown on
message.toString()
What is the expected output? What do you see instead?
no Error thrown
What version of the product are you using? On what operating system?
2.4.1
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 26 Nov 2012 at 10:18
In certain cases a null object reference error is thrown when trying to run
toString on a protobuf object.
TypeError: Error #1009: Cannot access a property or method of a null object
reference.
at
-0Rv::TextFormat$/-0I2()C:\Users\Atry\Desktop\protoc-gen-as3\as3\com\netease\pro
tobuf\TextFormat.as:290
at
-0Rv::TextFormat$/-I8()C:\Users\Atry\Desktop\protoc-gen-as3\as3\com\netease\prot
obuf\TextFormat.as:199
at
-0Rv::TextFormat$/-0Cm()C:\Users\Atry\Desktop\protoc-gen-as3\as3\com\netease\pro
tobuf\TextFormat.as:309
at
-0Rv::TextFormat$/-0PH()C:\Users\Atry\Desktop\protoc-gen-as3\as3\com\netease\pro
tobuf\TextFormat.as:319
at
_-0Rv::Message/toString()C:\Users\Atry\Desktop\protoc-gen-as3\as3\com\netease\pr
otobuf\Message.as:209
Original issue reported on code.google.com by [email protected]
on 7 Jun 2012 at 12:14
use the newest, output parse error,
back 1.1.0, ok!
Original issue reported on code.google.com by [email protected]
on 6 Dec 2013 at 7:53
I would like to have a feature like 'option java_package'. For example, if I
added:
option as3_package = "com.example.foo"
Then the generated classes would end up in the package com.example.foo.
Original issue reported on code.google.com by [email protected]
on 1 Aug 2011 at 4:17
Branch name:
mail-as3-service
http://code.google.com/r/mail-as3-service/source/list
Purpose of code changes on this branch:
# 生成 as3 的 service interface,方便实现从另一端调用 as3
提供的服务,另外已经据此实现了 rpc,见
http://code.google.com/p/abu-rpc/source/browse/#svn%2Ftrunk%2Fsrc%2Factionscript
3
# 生成的代码见
http://code.google.com/p/abu-rpc/source/browse/trunk/src/actionscript3/echo/src/
EchoService%24Interface.as 已经按之前的建议提供 done
函数,提供异步返回结果的机制
# (与原实现不兼容之处)修改了 stub 类的命名,全部加了
$Stub 后缀,例见
http://code.google.com/p/abu-rpc/source/browse/trunk/src/actionscript3/echo/src/
EchoService%24Stub.as
# 按上次修改意见,已经修改了 writeIService 之类的函数。
When reviewing my code changes, please focus on:
After the review, I'll merge this branch into:
/trunk
Original issue reported on code.google.com by [email protected]
on 25 May 2012 at 2:59
What steps will reproduce the problem?
1. Send float from as3 to c
2. The variable Number is 123 (example)
3.
What is the expected output? What do you see instead?
A float. it arrives a 0
What version of the product are you using? On what operating system?
last
Please provide any additional information below.
If we want a parse the data like 123.12 is working ok, but if the number is an
integer or the are more numbers after the comma, it goes crazy.
Original issue reported on code.google.com by [email protected]
on 11 Nov 2011 at 2:09
1. Defining a nested message as follow:
message Test{
message Nested{
required int32 id = 1;
}
repeated Nested nested = 1;
}
2. Generated code as follow
public final function readFromSlice(input:flash.utils.IDataInput,
bytesAfterSlice:uint):void {
...
case 1:
const nested$element:MessageDefinition.Test.Nested = new MessageDefinition.Test.Nested();
...
3. 'const' is causing compiling error
Original issue reported on code.google.com by [email protected]
on 9 Jun 2011 at 8:51
What steps will reproduce the problem?
1. Run protoc with the protoc-gen-as3 plug-in
2. Compile the generated code with the Flex 4 SDK compiler
3. Observe the warning described below
What is the expected output? What do you see instead?
Here is an example of the message:
[WARNING] C:\...\Projects\foo\src\main\flex\protocol\MapInfoMessage.as:[10,21]
No constructor function was specified for class MapInfoMessage. public
final class MapInfoMessage extends com.netease.protobuf.Message implements
flash.utils.IExternalizable {
What version of the product are you using? On what operating system?
0.8.8
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 23 Jul 2010 at 7:09
Attachments:
将字符串格式化为字节数组时,能不能指定编码为unicode呀?�
��不单是utf-8,希望
改进,谢谢。
Original issue reported on code.google.com by [email protected]
on 20 May 2010 at 8:43
Is it possible to have as3_package option just like java_package to specify
namespace for the generated as3 classes?
Thanks!
Original issue reported on code.google.com by [email protected]
on 11 Mar 2010 at 11:16
Add a flag indicate generated code should use haxe.Int64 instead of
com.netease.protobuf.Int64 and com.netease.protobuf.Int64 .
Original issue reported on code.google.com by [email protected]
on 7 Feb 2012 at 4:06
"Packed" is a option for repeated fields.
Original issue reported on code.google.com by [email protected]
on 13 Jan 2010 at 2:33
我现在每个包都是一个message.
然后每个message都是由head和type开头的,tag也都一样,只是默认值
不一样.
optional int32 head = 1;
optional int32 type = 2;
比如message LoginOKResponder的定义如下:
message LoginOKResponder {
optional int32 head = 1 [default = 1];
optional int32 type = 2 [default = 1];
required string id = 3;
required string name = 4;
}
在java中使用CodedInputStream可以直接readInt32得到head和type,
CodedInputStream input = CodedInputStream.newInstance(data);
int header = input.readInt32();
int action = input.readInt32();
这样会得到header 和 action.
但是在AS中我找不到类似的类或方法,
用ReadUtil读出来的是错误的值.
然后我定义了SimpleResponder,结构如下:
message SimpleResponder {
optional int32 head = 1;
optional int32 type = 2;
}
我本来想让SimpleResponder
帮我把head和type读出来,但是发现读出来的也是错的.
希望作者能帮忙实现我这样的需求.
我的每个message都有head和type,然后想在不知道具体的message类的
情况下读到head和type.
当然也可以把head和type从message里分出来.但是我想使用proto的��
�认值,然后就不用在代码里写了,而且用message包起来也方便传�
��的.
最后,谢谢了.希望作者能实现我这个需求.
Original issue reported on code.google.com by [email protected]
on 2 Feb 2013 at 4:54
禁止在 LENGTH_DELIMITED 字段中使用 packed = true
收包时判断一个 repeat 字段是否 packed 要根据 wire type
而不是编译时选项。
Original issue reported on code.google.com by [email protected]
on 18 Jan 2010 at 4:06
http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#services
Original issue reported on code.google.com by [email protected]
on 14 Jan 2010 at 8:33
What steps will reproduce the problem?
Run protoc with the protoc-gen-as3 plugin, specifying the attached .proto
file
What is the expected output? What do you see instead?
On compiling the generated code (flex 3.2), observe the following errors:
[ERROR]...protocol\ChatMessage.as:[10,41] Base class is final.
public final class ChatMessage extends Message implements IExternalizable {
[ERROR]...protocol\ChatMessage.as:[26,31] Method marked override must
override another method. protected override function
writePostposeLength(output:PostposeLengthBuffer):void {
What version of the product are you using? On what operating system?
Version 0.8.6 of protoc-gen-as3
Version 3.2 of the Flex SDK
Windows
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 21 May 2010 at 2:52
Attachments:
What steps will reproduce the problem?
1. Sender sends two payloads in quick succession
2. Receiver is unable to read entire payload off of socket before second
payload hits.
3. Receiver begins reading the second payload as part of the first payload,
adding payload 2's data to payload 1 and/or throwing an error when payload 2
has a common field with payload 1 and it tries to assign payload 2's value to
the already assigned field from payload 1
What is the expected output? What do you see instead?
The expected output would be the correct reception of two unique payloads.
Instead you see a single payload consisting of 2 payloads data or an error when
reading the second payload.
What version of the product are you using? On what operating system?
3.0.8.9
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 2 Dec 2010 at 11:12
See
https://code.google.com/apis/protocolbuffers/docs/reference/cpp/google.protobuf.
text_format.html#TextFormat.Printer.SetUseShortRepeatedPrimitives.details
Original issue reported on code.google.com by [email protected]
on 6 Feb 2012 at 5:53
比如说
message Aaa {
message User {}
}
message Bbb {
message User {}
}
就会生成两个User类在两个不同的package下,但是导入使用就很
麻烦
或许生成AaaUser和BbbUser类比较好
Original issue reported on code.google.com by [email protected]
on 11 Apr 2012 at 6:25
C:\Users\admin\Desktop\protoc-gen-as3-1.1.0-bin>protoc.exe
--plugin=protoc-gen-as3=C:\Users\admin\Desktop\protoc-gen-as3-1.1.0-bin\protoc-g
en-as3.bat -as3_out=C:\Users\admin\Desktop\protoc-gen-as3-1.1.0-bin
C:\Users\admin\Desktop\protoc-gen-as3-1.1.0-bin\a.proto
Unknown flag: -a
在命令行里执行,出现未知的标记 -a 不知道是怎么回事。
protoc.exe用2.3 和 2.4.1都出现这个问题。
Original issue reported on code.google.com by [email protected]
on 30 Jan 2013 at 1:14
What steps will reproduce the problem?
1. download and build the 2.3.1 repo of protoc
2. download and extract protoc-gen-as3-0.8rc2-bin.tar.gz
3. run protoc with the following command line:
/home/orion/sandbox/orion/pb2.3.0/linux/bin/protoc --plugin=protoc-gen-
as3=/home/orion/sandbox/orion/pb2.3.0/protoc-gen-as3/dist/protoc-gen-as3
--as3_out foo ./xs1.proto
(full paths included in case i'm doing something dumb)
What is the expected output? What do you see instead?
the result is the following error:
-----------------
/home/orion/sandbox/orion/pb2.3.0/protoc-gen-as3/dist/protoc-gen-as3: program
not found or is not executable
--as3_out: protoc-gen-as3: Plugin failed with status code 1.
-----------------
if i remove "-e" from the first line of protoc-gen-as3,
then the error changes to:
-----------------
Exception in thread "main" java.lang.NoClassDefFoundError:
com/netease/protocGenAs3/Main
Caused by: java.lang.ClassNotFoundException: com.netease.protocGenAs3.Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
Could not find the main class: com/netease/protocGenAs3/Main. Program will exit.
--as3_out: protoc-gen-as3: Plugin failed with status code 1.
-----------------
What version of the product are you using? On what operating system?
these results are consistent on OS X (snow leopard) and on a centos linux box:
Linux version 2.6.18-164.6.1.el5 ([email protected])
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 19 Jan 2010 at 10:37
We have faced with the problem of extending server side api.
We added optional field at the end of the message:
optional uint64 creation_date = 11;
Flash client fails with next error(java and c clients work correctly):
Exception fault: Error: Invalid wire type: 3
at com.netease.protobuf::ReadUtils$/skip()[.../ReadUtils.as:32]
bytes for this fields look like - 58a080a3eb8227
58 - field descriptor
a080a3eb8227 - data
According to code of ReadUtils:
case WireType.VARINT:
while (input.readUnsignedByte() > 0x80) {}
but we have second byte = 80 so the parsing is stopped
and next bytes are not read correctly
Original issue reported on code.google.com by adeyneka
on 14 Aug 2012 at 12:12
What steps will reproduce the problem?
1. Create a .proto file with a message containing a required field
2. Compile the proto to an as file
3. Call toString() against the generated message
What is the expected output? What do you see instead?
field name and value of the required field. Get an empty string instead
What version of the product are you using? On what operating system?
1.0.0rc3 on Windows 7 64bit
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 25 Jul 2011 at 5:49
您好,现在我们有个新项目客户端打算用flash来做,服务器用
java。消息协议我打算用protobuf。
,我想问一下就是我之前java端protobuff版本是2.5.x,看了下proto
buff-gen-as用的是2.4.1,请问这个有没有影响,需不需要版本统�
��?
Original issue reported on code.google.com by [email protected]
on 12 Sep 2013 at 3:39
What steps will reproduce the problem?
1. Adobe Air SDK package ipa
2. SDK15 without -useLegacyAOT yes
3. SDK16
What is the expected output? What do you see instead?
Compilation failed while executing : compile-abc
Please provide any additional information below.
TextFormat.as
The functoin skipWhitespace() has an infinite loop.
You can fix this the bug by Using:
private static function skipWhitespace(source:ISource):void {
for (;; ) {
const b:int = source.read()
switch (b) {
case 0x20:/* space */
case 0x09:/* \t */
case 0x0a:/* \n */
case 0x0d:/* \r */
continue
case 0x23:/* # */
for (;;) {
var isLineEnd:Boolean = false;
switch (source.read()) {
case 0x0a:/* \n */
case 0x0d:/* \r */
isLineEnd = true;
break;
default:
break;
}
if(isLineEnd)
{
break;
}
}
break;
default:
source.unread(b)
return
}
}
}
Original issue reported on code.google.com by [email protected]
on 23 Jan 2015 at 12:26
I would like to use no dynamic class.
And keep unknown field value.
Best regards
Original issue reported on code.google.com by [email protected]
on 7 Nov 2011 at 8:19
message ParentMessage {
extensions 1 to max;
}
extend ParentMessage {
optional ExtensionMessage extension_message = 1;
}
message ExtensionMessage {
}
This will generate a file EXTENSION_MESSAGE.as that initializes
ParentMessage.extensionReadFunctions.
This will generate a file initializer.as.inc that references EXTENSION_MESSAGE.
The Bug: If you include these files in a program in an ActionScript project in
Flash CS4, the references to EXTENSION_MESSAGE are ignored.
ParentMessage.extensionReadFunctions is not initialized.
Original issue reported on code.google.com by [email protected]
on 2 Aug 2011 at 5:08
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.