3 - Address the remaining "---" issues
5 - Get the rest of the unit tests working
6 - Ensure we can parse/print descriptor.proto, unittests.proto, etc
7 - unittests.proto completely fails when 'optimize = SPEED'
8 - Ensure we can (de)serialize "golden" data against unittests.proto
9 - Get the rest of Bob Brown's tests working
10 [ - Convert examples into a test suite ]
11 [ - Implement 'protobufs-equal' predicate ]
13 - Get "namespaces" (i.e., nested classes) fully working
14 [ - Messages and enums should have a 'fully-qualified-names' slot ]
15 [ that records both symbols and strings, and in the correct package ]
16 [ - Printers need to print qualified names, as needed ]
17 [ - 'find-message' and 'find-enum' need to search namespaces ]
18 [ if the quick compare against the name/class fails ]
19 - 'message Foo { message Bar { ... } ... }'
20 should (maybe!) produce a Lisp class defaultly named 'foo.bar'
21 - Add a keyword arg, :class-name, that overrides this convention;
22 in .proto files this should be called lisp_class
23 - Also, add :slot-name for slots and :type-name for enums
24 (called lisp_slot and lisp_type in .proto files)
25 - Or maybe not, since 'foo.bar' isn't very Lispy;
26 for the most part, packages provide enough room to avoid name clashes
28 - Get 'merge-from-message' fully working
29 - See the place in 'deserialize-object' that needs to merge, too
30 - Maybe this isn't so useful in Lisp, where I'd prefer to encourage
33 - Lose 'proto-class', replace it with 'proto-type';
34 its type is (or null symbol)
35 'proto-type' should always be the name from the Lisp side
36 [ All 'define-xxx' macros should have, as their first argument, ]
37 [ a type (not a "name") ]
38 [ In .proto files, there should be an 'option lisp_name="pkg:name"' ]
39 [ which can be used to override the 'proto->class-name' default ]
40 [ for messages and enums ]
42 - Refactor 'protobuf-field' so the names are clearer:
43 - 'proto-value' should be the Lisp name of the slot
44 (this is already the case)
45 - Add new 'proto-field' slot,
46 which will hold the Protobufs name of the field
47 (this used to be in 'proto-name')
48 - Lose the existing 'proto-type' slot,
49 then rename the 'proto-class' slot to 'proto-type';
50 this will hold the Lisp name of the slot type
51 - 'proto-name' will hold the Protobufs name of the field type
52 (this used to hold the Protobufs name of the field)
53 [ - &key name should give the Protobufs name for the field ]
54 [ - 'option lisp_name="pkg:name"' should give the Lisp name for the slot ]
56 [- Need search paths in the ASDF .proto module ]
58 [- Make 'import' really work ]
59 [ - *all-protobufs* should record keyed by pathname, too ]
60 [ - 'import' should not bother loading if the import is present, ]
61 [ and should record the imported schema when it's done ]
62 [ - 'find-message' and 'find-enum' should search imports, too ]
64 [- Implement 'vector-of' in addition to 'list-of' ]
66 [- Do we need 'has-extension' and 'clear-extension'? ]
67 [ If so, just generate methods for them in 'define-extend' ]
69 [- 'package'/'lisp_package' should create the package, if necessary. ]
71 [- Don't generate 'import "net/proto2/proto/descriptor.proto"' and ]
72 [ 'extend proto2.MessageOptions { ..}' lines unless we need to include ]
73 [ one of the lisp_* options in the generated model ]
76 [ It should probably just compile/load the file when the import ]
78 [ - The Lisp macros should be able to import both .lisp and .proto files ]
79 [ - The .proto parser should only be able to import .proto files ]
81 [- Handle 'extension' and 'extends' ]
82 [ - 'define-extension' just declares the extension within a message ]
83 [ and adds it to 'proto-extensions' for the message ]
84 [ - Easiest is to add an "extension-p" flag to 'protobuf-message' ]
85 [ - Define new 'define-extends' macro ]
86 [ which *copies* all slots from the message being extended, ]
87 [ then just adds the extension fields as (flagged) ordinary fields ]
88 [ with reader/writer function (see below) ]
89 [ - Factor out field-processing code from 'define-message' ]
90 [ - If we do it this way, no other special magic is needed ]
91 [ Serialization, e.g., should just work ]
92 [ Scoping should also just work ]
93 [ - We will need 'proto-writer' as an analog to 'proto-reader' ]
94 [ - Get deserialization working; ]
95 [ Need to call the 'proto-writer' function if its around ]
96 [ instead of just using (setf (slot-value ...) ...) ]
97 [ - Don't forget to check that the "extends" indexes match ]
98 [ what was declared by 'define-extension' ]
99 [ - And don't allow overlapping extension indexes ]
100 [ - Generate new getter and setter methods for each extended slot: ]
101 [ (let ((an-int 10)) ]
102 [ (declare (type (or integer null) an-int)) ]
103 [ (defmethod an-int ((object extendable-foo)) ]
105 [ (defmethod (setf an-int) (val (object extendable-foo)) ]
106 [ (declare (type (or integer null) val) ]
107 [ (setq an-int val)))) ]
108 [ - Handle "extends" in the parser, too ]
110 [- Support "deprecated" groups. Sigh. ]
111 [ - Need 'proto:define-group', which is like 'define-message' ]
112 [ - Need to parse 'group' things ]
113 [ - "option group Locator = 1 { ... }" ]
114 [ means create a submessage (and class!) called "Locator" ]
115 [ whose field is named "locator" (note lower case) ]
116 [ then just treat it like a message ]
117 [ - Need a printer for groups, too ]
118 [ - Make 'proto-extension-p' be 'proto-message-type', ]
119 [ which is one of :message, :extends or :group ]
120 [ - (De)serialization of groups uses a start and end tag, ]
121 [ and the end tag counts as part of the group length ]
122 [ - Serialization uses the start-group wire type, ]
123 [ then serializes the message, ]
124 [ then writes the end-group tag ]
125 [ - Deserialization works the usual way, ]
126 [ except that it stops at a matching end-group tag ]
127 [ (i.e., has the same field number as the start tag) ]
128 [ - Add new 'end-tag' argument to 'serialize-object' and ]
129 [ the 'serialize' internal function, it's the expected ]
130 [ end tag value to indicate end-of-group; if the default ]
131 [ value for this is 0, then the (i= tag 0) test can be ]
132 [ changed to (i= tag end-tag) (sweet!) ]
134 [- We need both 'package' and 'lisp-package' for protobufs ]
135 [ 'package' gets set from the 'package' line in .proto files ]
136 [ 'lisp-package' gets set from a new 'option lisp_package="pkg"' ]
137 [ 'define-protobuf' needs both :package and :proto/:lisp-package ]
139 [- Speed up 'list-of' by shadowing the Quux version, ]
140 [ and don't do any type-checking (!) ]
141 [ Having done this, we can probably remove the hack of using map:map, ]
142 [ which should make deserialization much faster ]
144 [- 'proto-name' should always be the name from the Protobufs side; ]
145 [ its type is (or null string) ]
146 [ All 'define-xxx' macros should have '&key name' which gives the Protobufs ]
147 [ name, which can be used to override the 'class-name->proto' default ]
149 [- 'class-override' should be called 'alias-for'; ]
150 [ its type is (or null symbol) ]
151 [ 'define-message' and 'define-enum' both get '&key alias-for' ]
153 [- 'find-message' and 'find-enum' should only look at (the new) 'proto-type', ]
154 [ and never (the new) 'proto-alias-for' ]
156 [- 'deserialize-object' uses the alias when it calls 'make-instance', ]
157 [ or if there is no alias, 'proto-type' ]
159 [- 'serialize-object' and 'object-size' should take both 'object' and 'type' ]
160 [ args, and should not call 'class-of' (and do call it "type") ]
161 [ The 'cl' (and 'class') locals in '(de)serialize-object' and 'object-size' ]
162 [ should instead be called 'type' ]
163 [ In .proto files, there should be 'option lisp_alias="pkg:name"' ]
164 [ that gets used to fill in 'proto-alias-for' ]
166 [- 'serialize-object' and 'object-size' never use the alias; ]
167 [ instead all the "dispatching" should be done of off 'proto-type', ]
168 [ Ditto, 'print-text-format' ]
170 [- Deserialization should stop if it sees a #x00 in the position where ]
171 [ it's expecting a tag, since no tag can be #x00 (fields start at 1) ]
173 [- The "name" of a protobuf should be the camel-cased file name ]
174 [ The "type" of a protobuf should just be the file name as a keyword symbol ]
176 [- RPCs should have 'input-name', 'input-type', 'output-name' and 'output-type' ]
177 [ The "name" ones are for the Protobufs side ]
178 [ The "types" ones are for the Lisp side; we look up on "type" only ]
179 [ In the Lisp, the RPC types can be either 'type' or '(type :name <name>)' ]
180 [ In .proto files, there should be an 'option lisp_name="pkg:name"' ]
181 [ which can be used to override the 'proto->class-name' default ]
182 [ for the name of the RPC function ]
184 [- Finishing eliminating 'protobuf' argument from the API ]
185 [ - Lose it in 'serialize-object-to-stream' and 'deserialize-object-from-stream']
186 [ - Rename it to 'trace' in '(de)serialize-object' and 'object-size', ]
187 [ make it be the last supplied argument ]
188 [ - Fix up the '(de)serialize-object' and 'object-size' generators, too ]
189 [ - Apply the same fix to 'print-text-format' ]
190 [ - Then make the compatibility API actuallty work ]
192 [- Implement 'parse-text-format' ]
195 [ 'define-proto' -> 'define-schema' ]
196 [ 'protobuf' (class name) -> 'protobuf-schema' ]
197 [ 'find-protobuf' -> 'find-schema' ]
198 [ *all-protobufs* -> *all-schemas* ]
199 [ 'parse-protobuf-from-file' -> 'parse-schema-from-file' ]
200 [ 'parse-protobuf-from-stream' -> 'parse-schema-from-file' ]
201 [ 'write-protobuf' -> 'write-schema' ]
202 [ 'write-protobuf-as' -> 'write-schema-as' ]
203 [ 'ensure-all-protobufs' -> 'ensure-all-protobufs' ]
204 [ 'ensure-protobuf' -> 'ensure-protobuf' ]
205 [ 'protobuf-upgradable' -> 'schema-upgradable' ]
206 [ 'protobufs-equal' -> 'schemas-equal' ]
207 [ 'generate-protobuf-schema-for-classes' -> 'generate-schema-for-classes' ]
208 [ 'write-protobuf-schema-for-classes' -> 'write-schema-for-classes' ]
210 [- Write documentation ]