Skip to content
  1. Dec 09, 2012
  2. Nov 27, 2012
    • Ben Wagner's avatar
      fix cross-package and forward references in cl-protobufs · 8520d6ef
      Ben Wagner authored
      * Previously, if a field in a .proto file referenced a message in
        another proto file using a different lisp package, the cl-protobufs
        library would silently fail to serialize the field.  A similar
        problem would occur if a message defined later in the file used the
        lisp_name option to override the name generated by cl-protobufs.
        This change fixes these issues and others.
      * Add conditions that are signaled when encountering an undefined
        type.
      * Delay assigning lisp classes/types to fields and methods until all
        possible forward references have been parsed.
         * This allows the class slot to be unbound, so check for that case
           in print-object methods.
         * Add a test for forward references to messages that override the
           lisp name.
         * Add a test for references to messages and enums defined in
           another proto file with a different lisp package.
         * Change color-wheel-stability test, because it used "string" as
           the input type for an rpc, which seems to be disallowed (although
           I haven't found this documented anywhere).
      * Signal errors during parsing for undefined types.
         * Add a test for these errors.  Add assert-error macro to qtest.
      * Signal a condition if we are unable to find the definition for a
        field's type during serialization, deserialization, determining an
        object's serialized size, printing text format, parsing text format,
        or generating code for one of the above.
      * Remove logic in find-qualified-name that indirects through lisp
        packages.  Proto packages and lisp packages do not necessarily map
        1-to-1.
      * Always use the schema's lisp package for any symbols generated when
        parsing proto files.
      * When generating lisp code using write-schema-as, set the package to
        the package used in the generated file, so that ~s will print the
        package prefix in the correct circumstances.
      * Remove broken proto1 "streams" parsing ("returns" comes before
        "streams" in every example I've found); replace with proto2 syntax.
      * In process-imports, the call to find-schema using a pathname was not
        giving the expected result.  Sidestep this issue by using the same
        logic to find the schema as is used earlier in the function.
      8520d6ef
  3. Sep 18, 2012
    • Scott McKay's avatar
      Speed up unoptimized serialization · 9a1d9899
      Scott McKay authored
      Testing : precheckin --full --strict-errors
      Reviewer: Fare
      
      JTB impact: No
      Ops impact: No
      
      Change to config                        : No
      Change to XML schema                    : No
      Change to DB schema                     : No
      Change to transport (timeouts, headers) : No
      Any change (or new use) of OAQs         : No
      Change to inter-component transactions  : No
      Depends on any other checkin / bug      : No
      
      Tests that will verify:
      
      The CL-Protobufs tests
      
      Description:
      
      The unoptimized serialization code was slower than
      it needed to be and was a Niagara falls of consing.
      
      The problem is that (map () (curry ...)) is poorly
      optimized, which is a shame because it's such a nice
      coding style. :-P
      
      The fix is to replace 'map' with iteration (sigh) in
      a few critical places.
      
      - Add 'doseq', which chooses between 'dolist' or 'dovector'.
      - Make 'serialize-object', 'deserialize-object' and 'object-size'
        use 'doseq' instead of using 'map'.
      - Ditto for 'print-text-format'.
      - Fix the 'serialize-packed' and 'packed-size' optimizers to
        use 'dolist' or 'dovector' based on whether the field is
        a vector field. This makes the optimized code faster, too.
      - Make the optimized serializer generators pass in 'vectorp'
        so that the wire-format optimizers can do a better job.
      
      
      
      git-svn-id: http://svn.internal.itasoftware.com/svn/ita/trunk/qres/lisp/libs/cl-protobufs@562921 f8382938-511b-0410-9cdd-bb47b084005c
      9a1d9899
  4. Sep 07, 2012
    • Scott McKay's avatar
      Add a few missing features that aren't in any documentation. · 5d4236e6
      Scott McKay authored
      Testing : precheckin --full --strict-errors
      Reviewer: Fare (please)
      
      JTB impact: No
      Ops impact: No
      
      Change to config                        : No
      Change to XML schema                    : No
      Change to DB schema                     : No
      Change to transport (timeouts, headers) : No
      Any change (or new use) of OAQs         : No
      Change to inter-component transactions  : No
      Depends on any other checkin / bug      : No
      
      Tests that will verify:
      
      I extended the CL-Protobufs examples
      
      Description:
      
      Add a few missing features that aren't in any documentation.
      
      String literals can look like "foo"<whitespace>"bar".
       - Fix 'parse-string' to handle this.
      
      Option values can be complex structures, not just atoms.
       - If 'parse-proto-option' sees a '{' character after the '=',
         it should use 'parse-text-format' to read the option value.
       - Fix the 'protobuf-option' printer to call 'print-text-format'
         for complex option values.
       - Minor refactoring to the text format parser and printer in
         order to support the above.
      
      
      
      git-svn-id: http://svn.internal.itasoftware.com/svn/ita/trunk/qres/lisp/libs/cl-protobufs@560639 f8382938-511b-0410-9cdd-bb47b084005c
      5d4236e6
  5. Aug 31, 2012
    • Scott McKay's avatar
      Add type aliases to CL-Protobufs · a732dcb3
      Scott McKay authored
      Testing : precheckin --full --strict-errors
      Reviewer: Fare (please)
      
      JTB impact: No
      Ops impact: No
      
      Change to config                        : No
      Change to XML schema                    : No
      Change to DB schema                     : No
      Change to transport (timeouts, headers) : No
      Any change (or new use) of OAQs         : No
      Change to inter-component transactions  : No
      Depends on any other checkin / bug      : No
      
      Tests that will verify:
      
      The CL-Protobufs tests
      
      Description:
      
      Add type aliases to CL-Protobufs. It's a Lisp-only
      feature that allows you define a new Protobufs type in
      terms of a Lisp type, a serializer and a deserializer.
       - Add a new model class, 'protobuf-type-alias'.
       - Extend schemas and messages so that they can hold
         a set of type aliases; add 'find-type-alias'.
       - Add 'define-type-alias'.
       - Factor out 'lisp-type-to-protobuf-type' from
         'clos-type-to-protobuf-type', I need it for the
         'define-type-alias' macro.
       - Fix the schema printer to print 'define-type-alias'
         for .lisp schemas, and to add a comment describing
         the type alias in .proto schemas.
       - Extend the wire format (de)serializer to know
         about type aliases; it just (de)serializes the
         Lisp type as the Protobufs primitive type using
         the provided (de)serializer functions. There's
         zero cost to this if you don't use aliases.
       - Update the optimized serialization generation.
       - Similarly extend the text format (de)serializer
         to know about type aliases.
       - Change an example to use a type alias for 'date'.
       - Update the documentation.
      
      
      
      git-svn-id: http://svn.internal.itasoftware.com/svn/ita/trunk/qres/lisp/libs/cl-protobufs@559861 f8382938-511b-0410-9cdd-bb47b084005c
      a732dcb3
  6. Jun 11, 2012
  7. May 22, 2012
    • Scott McKay's avatar
      Add more stuff to the test suite, and fix what it uncovered. · b6317f29
      Scott McKay authored
       - Behavior of ':default xxx'/[default=xxx] was not stable,
         so add an "empty default" marker and respect it during
         parsing and printing.
       - 'find-option' now returns a third "found-p" value, useful
         for the better handling of defaults.
       - Don't print slot readers/writers if they have the same name
         as what would be (silently) generated by the macrology.
       - Don't print 'import descriptor.proto' lines if there are
         no 'lisp_xxx' options in the generated code.
       - Add 'clear-field' to the API; add the functions it needs.
       - Be more careful about how :conc-name interacts with the
         generation of readers/writers.
       - When parsing from a .proto file, force the conc-name to
         be "" unless requested explicitly not to. This has the
         effect of generating readers/writers for all the fields
         of imported Protobufs messages, which I think is probably
         the desired behavior.
       - Add 'make-byte-vector' for convenience.
      
      Passes 'precheckin'. Even with the new unit tests in place.
      
      
      git-svn-id: http://svn.internal.itasoftware.com/svn/ita/trunk/qres/lisp/quux/protobufs@545177 f8382938-511b-0410-9cdd-bb47b084005c
      b6317f29
  8. May 10, 2012
  9. May 08, 2012
  10. Apr 26, 2012
  11. Apr 24, 2012
  12. Apr 20, 2012
  13. Apr 11, 2012
  14. Apr 10, 2012
  15. Apr 05, 2012
  16. Apr 04, 2012
  17. Apr 02, 2012
  18. Apr 01, 2012
  19. Mar 15, 2012
  20. Mar 09, 2012
  21. Mar 07, 2012
  22. Mar 06, 2012