jonahgraham / protobuf-dt

Automatically exported from code.google.com/p/protobuf-dt
0 stars 0 forks source link

Enum FieldOption results in "Couldn't resolve reference to Literal 'XXX'" #135

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

package myproto;

option java_package = "myproto";

import "google/protobuf/descriptor.proto";

enum CfColumnType {
    NORMAL = 0;
    PRIMARY_KEY = 1;
}

extend google.protobuf.FieldOptions {
    optional CfColumnType cfColType = 50191 [       
        default = NORMAL        
    ];
    optional string cfColName = 50192;
}

message ProductDescription {
    required bytes productId = 11 [
        (cfColType) = PRIMARY_KEY,
        (cfColName) = "e"
    ];
}

What is the expected output? What do you see instead?
Get an error in eclipse on the use of PRIMARY_KEY in ProductDescription's 
productId field options.  The error message is:  "Couldn't resolve reference to 
Literal 'PRIMARY_KEY'".

What version of the product are you using? On what operating system?
Protobuf-dt version 1.0.2.201109132345, Eclipse Indigo build id: 20110615-0604, 
Windows 7 Ultimate 64-bit.

Please provide any additional information below.
This error happens a million times in my proto file, and fixing it would make 
my eclipse workspace Red X free!  ;)  Thanks for a great tool!  Maybe also nix 
the contraction on "Couldn't" in the error message and make it "Could not"?  :D

Original issue reported on code.google.com by dwoldr...@gmail.com on 15 Oct 2011 at 11:04

GoogleCodeExporter commented 9 years ago
See issue 111 - I hope to get this fix integrated with the updated custom 
options support for the 1.0.11 release (the release after the current one).
https://code.google.com/p/protobuf-dt/issues/detail?id=111

If this fix is critical you can use the attached build which is based on 1.0.2 
but contains modifications detailed in issue 111 among others.

Please note that the attached build is from modified source and is neither an 
official nor supported build of protobuf-dt.

Original comment by compuwar...@gmail.com on 17 Oct 2011 at 4:14

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by alr...@google.com on 18 Oct 2011 at 11:21