]> asedeno.scripts.mit.edu Git - cl-protobufs.git/log
cl-protobufs.git
11 years agoRepeated fields should deserialize into vectors by default repeated-default-vector
Steven Spitz [Tue, 19 Mar 2013 19:20:22 +0000 (15:20 -0400)]
Repeated fields should deserialize into vectors by default

11 years agoMerge branch 'empty-message-serialization'
Alejandro R Sedeño [Sat, 16 Mar 2013 17:45:42 +0000 (13:45 -0400)]
Merge branch 'empty-message-serialization'

11 years agoAdd size caching to object-size methods generated for messages without fields
Alejandro R Sedeño [Sat, 16 Mar 2013 06:12:30 +0000 (02:12 -0400)]
Add size caching to object-size methods generated for messages without fields

Fixes the bug tickled by the tests in this commit's parent.

11 years agoAdd tests for serializing emtpy messages in various contexts
Steven Spitz [Fri, 15 Mar 2013 17:57:52 +0000 (13:57 -0400)]
Add tests for serializing emtpy messages in various contexts

These tests tickle an error serializing emtpy messages as fields of
other messages when using speed-optimized serializers.

11 years agoasdf-support: source-file-explicit-type, not source-explicit-file-type
Alejandro R Sedeño [Fri, 8 Mar 2013 01:33:09 +0000 (20:33 -0500)]
asdf-support: source-file-explicit-type, not source-explicit-file-type

11 years agoMerge branches 'asdf-component-type-consistency' and 'record-non-import-paths'
Alejandro R Sedeño [Thu, 7 Mar 2013 23:42:35 +0000 (18:42 -0500)]
Merge branches 'asdf-component-type-consistency' and 'record-non-import-paths'

11 years agomodel-classes: Don't look at *COMPILE-FILE-PATH* when recording schemas by pathname
Alejandro R Sedeño [Thu, 7 Mar 2013 22:40:59 +0000 (17:40 -0500)]
model-classes: Don't look at *COMPILE-FILE-PATH* when recording schemas by pathname

11 years agoasdf-support: note which proto file we're loading a fasl for
Alejandro R Sedeño [Thu, 7 Mar 2013 22:39:51 +0000 (17:39 -0500)]
asdf-support: note which proto file we're loading a fasl for

This ensures that all pathnames for all .proto files we load get put
in PROTO-IMPL::*ALL-SCHEMAS*, not just those we import.

11 years agoasdf-support: simplify do-process-import internals
Alejandro R Sedeño [Thu, 7 Mar 2013 18:40:03 +0000 (13:40 -0500)]
asdf-support: simplify do-process-import internals

Don't override file extension for imports; assume the string that was
used to form the pathname is accurate. This makes base-path and
proto-file the same, so fold them both into proto-file.

Drop bogus checks for type "proto".

11 years agoasdf-support: simplify do-process-import calling
Alejandro R Sedeño [Thu, 7 Mar 2013 18:30:31 +0000 (13:30 -0500)]
asdf-support: simplify do-process-import calling

11 years agoasdf-support: hardcode "proto" in fewer places
Alejandro R Sedeño [Thu, 7 Mar 2013 17:22:57 +0000 (12:22 -0500)]
asdf-support: hardcode "proto" in fewer places

11 years agoqtest: Make sure we end on a fresh line after running tests
Alejandro R Sedeño [Thu, 7 Mar 2013 21:22:15 +0000 (16:22 -0500)]
qtest: Make sure we end on a fresh line after running tests

11 years agoMerge branch 'portability'
Alejandro R Sedeño [Wed, 6 Mar 2013 05:32:06 +0000 (00:32 -0500)]
Merge branch 'portability'

11 years agoMerge branch 'type-expansion' into portability
Alejandro R Sedeño [Wed, 6 Mar 2013 05:24:06 +0000 (00:24 -0500)]
Merge branch 'type-expansion' into portability

11 years agoMerge branch 'rework-schema-import-and-lookup'
Alejandro R Sedeño [Wed, 6 Mar 2013 04:42:05 +0000 (23:42 -0500)]
Merge branch 'rework-schema-import-and-lookup'

11 years agoChange how protobuf schemas and classes are recorded and found
Alejandro R Sedeño [Tue, 5 Mar 2013 22:32:05 +0000 (17:32 -0500)]
Change how protobuf schemas and classes are recorded and found

* FIND-SCHEMA no longer works on a string or keyword. Both of these
  were based on the PATHNAME-NAME of the protobuf, which has a high
  probability of collision. (e.g., common.proto -> "COMMON", :COMMON)

  Instead, look up schemas based on package and name. For instance,
  the protobuf foo.proto, declaring "package FooPackage;", can be
  found with: (FIND-SCHEMA 'FOO-PACKAGE::FOO)

* Pathname-based schema lookup no longer ignores file type.

11 years agoasdf-support: rework import again
Alejandro R Sedeño [Tue, 5 Mar 2013 22:18:35 +0000 (17:18 -0500)]
asdf-support: rework import again

* DO-PROCESS-IMPORT is now responsible for deciding whether or not to
  process an import. It does so by searching for the .proto to be
  imported, and upon finding it, checks to see if we alredy have a
  schema for that pathname. Additionally, it now returns the pathname.

* PROCESS-IMPORTS and PROCESS-IMPORTS-FROM-FILE now defer the work of
  figuring out whether or not an import has been done to
  DO-PROCESS-IMPORT. PROCESS-IMPORTS uses the return value of
  DO-PROCESS-IMPORT to update the PROTO-IMPORTED-SCHEMAS of the schema
  being processed.

11 years agoasdf-support: more filename mangling
Alejandro R Sedeño [Tue, 5 Mar 2013 19:50:29 +0000 (14:50 -0500)]
asdf-support: more filename mangling

New functions:

* ASDF::PROTOBUF-MANGLE-NAME: Takes a pathname, returns a string to be
  used as a filename that represents the original path.
  e.g., #P"/foo/bar/baz.quux" becomes "foo-bar-baz-quux"

* ASDF::PROTOBUF-LISPIZE-PATHNAME: Takes a pathname, returns a new
  pathname with the name mangled as described above, and with a lisp
  type.

11 years agoAccording to protoc, this file was bogus; now it works
Alejandro R Sedeño [Tue, 5 Mar 2013 20:52:18 +0000 (15:52 -0500)]
According to protoc, this file was bogus; now it works

11 years agoutilities.lisp: This is how ABCL and XCL do type expansion
Alejandro R Sedeño [Sun, 3 Mar 2013 07:39:10 +0000 (02:39 -0500)]
utilities.lisp: This is how ABCL and XCL do type expansion

11 years agoutilities.lisp: This is how ECL and MKCL do type expansion
Alejandro R Sedeño [Sun, 3 Mar 2013 05:10:41 +0000 (00:10 -0500)]
utilities.lisp: This is how ECL and MKCL do type expansion

11 years agoMake (declare (values ...)) for rpc methods opt-in, rather than opt-out
Alejandro R Sedeño [Sun, 3 Mar 2013 05:09:09 +0000 (00:09 -0500)]
Make (declare (values ...)) for rpc methods opt-in, rather than opt-out

So far only CCL appears to consistently handle this.

11 years agopull in trivial-garbage for TG:MAKE-WEAK-HASH-TABLE
Alejandro R Sedeño [Sun, 3 Mar 2013 05:08:39 +0000 (00:08 -0500)]
pull in trivial-garbage for TG:MAKE-WEAK-HASH-TABLE

11 years agoIn the spirit of making CL-Protobufs represent exemplary modern Common Lisp code:
Scott McKay [Sun, 3 Mar 2013 09:52:37 +0000 (15:22 +0530)]
In the spirit of making CL-Protobufs represent exemplary modern Common Lisp code:
 - Use 'defparameter' instead of 'defvar' where appropriate.
 - Fix 'defvar' doc strings to distinguish between globals and "thread locals".
 - Avoid using 'nconc'. introduce a new 'appendf' macro instead.
 - Add a comment lamenting the fact that exporting something like 'proto-options'
   also exports the writer '(setf proto-options)'. Fixed in Dylan.

11 years agoDammit, forgot to save this file
Scott McKay [Fri, 1 Mar 2013 05:36:12 +0000 (11:06 +0530)]
Dammit, forgot to save this file

11 years agoAdd utilities 'make-option' and 'add-option' to make new work simpler
Scott McKay [Fri, 1 Mar 2013 05:31:55 +0000 (11:01 +0530)]
Add utilities 'make-option' and 'add-option' to make new work simpler

11 years agoUpdate copyright notices
Scott McKay [Thu, 28 Feb 2013 08:24:04 +0000 (13:54 +0530)]
Update copyright notices

11 years agoImplement in-object size caching, compile-time conditionalized on #+use-base-protobuf...
Scott McKay [Thu, 28 Feb 2013 06:42:33 +0000 (12:12 +0530)]
Implement in-object size caching, compile-time conditionalized on #+use-base-protobuf-message

11 years agoA few whitespace changes
Scott McKay [Thu, 28 Feb 2013 06:19:58 +0000 (11:49 +0530)]
A few whitespace changes

11 years agoasdf-support: decorate names of .lisp files generated from .proto files.
Alejandro R Sedeño [Thu, 28 Feb 2013 03:03:43 +0000 (22:03 -0500)]
asdf-support: decorate names of .lisp files generated from .proto files.

This prevents geodata.proto's FASL from being clobbered by
geodata.lisp's FASL. Before both were geodata.fasl, now the former is
geodata.proto.fasl.

This is generally a good idea.

11 years agoasdf-support: search path should be based on proto-file, not lisp-file
Alejandro R Sedeño [Thu, 28 Feb 2013 01:43:07 +0000 (20:43 -0500)]
asdf-support: search path should be based on proto-file, not lisp-file

11 years agoMerge branch 'asdf3'
Alejandro R Sedeño [Wed, 27 Feb 2013 23:41:30 +0000 (18:41 -0500)]
Merge branch 'asdf3'

11 years agoasdf-support: Use ASDF3 CHECK-LISP-COMPILE-RESULTS when relevant
Alejandro R Sedeño [Wed, 27 Feb 2013 23:28:08 +0000 (18:28 -0500)]
asdf-support: Use ASDF3 CHECK-LISP-COMPILE-RESULTS when relevant

11 years agoasdf-support: match asdf platform-specific compile options
Alejandro R Sedeño [Thu, 21 Feb 2013 03:56:22 +0000 (22:56 -0500)]
asdf-support: match asdf platform-specific compile options

11 years agoasdf-support: support for ASDF3
Alejandro R Sedeño [Tue, 19 Feb 2013 18:23:09 +0000 (13:23 -0500)]
asdf-support: support for ASDF3

11 years agoMerge branch 'split-package-rpc'
Alejandro R Sedeño [Wed, 27 Feb 2013 04:14:57 +0000 (23:14 -0500)]
Merge branch 'split-package-rpc'

11 years agoUpdate documentation
Alejandro R Sedeño [Tue, 26 Feb 2013 21:04:46 +0000 (16:04 -0500)]
Update documentation

11 years agoDecorate service method stubs and intern them in a different package
Alejandro R Sedeño [Tue, 26 Feb 2013 19:18:56 +0000 (14:18 -0500)]
Decorate service method stubs and intern them in a different package

The client-side stub is now CALL-FOO
The server-side stub is now FOO-IMPL

They are interned in package XXX-RPC, where XXX is the name of the
package being used by the rest of the schema.

11 years agofixup: 6ac9510 add missing close-paren
Alejandro R Sedeño [Thu, 21 Feb 2013 20:01:55 +0000 (15:01 -0500)]
fixup: 6ac9510 add missing close-paren

11 years agoparser.lisp: tweak method parsing
Alejandro R Sedeño [Wed, 20 Feb 2013 17:54:53 +0000 (12:54 -0500)]
parser.lisp: tweak method parsing

Don't assume that returning no options meant there was no body in the
method declaration. An empty body may have been there
instead. Distinguish that scenario with a second return value from
PARSE-PROTO-METHOD-OPTIONS and use that value in PARSE-PROTO-METHOD
determine whether or not to look for a semicolon.

11 years agoDon't assume 32-bits integers fit in a fixnum
Alejandro R Sedeño [Fri, 15 Feb 2013 23:13:13 +0000 (18:13 -0500)]
Don't assume 32-bits integers fit in a fixnum

Follow up to the last commit; I should really know better.

11 years agoFix double creation for ccl when high bits are negative
Alejandro R Sedeño [Fri, 15 Feb 2013 18:08:55 +0000 (13:08 -0500)]
Fix double creation for ccl when high bits are negative

11 years agoprinter.lisp: better preserve proto names
Alejandro R Sedeño [Tue, 12 Feb 2013 00:54:59 +0000 (19:54 -0500)]
printer.lisp: better preserve proto names

[proto -> lisp]
1) Do case-sensitive comparisons between the name we have and the name
   we would derive from #'CLASS-NAME->PROTO. Case matters.

2) Do not downcase :name options when we're outputting them to a .lisp
   file. Again, case matters.

3) Preserve names for PROTOBUF-SERVICEs, as necessary.

4) Preserve names, input-names, and output-names for PROTOBUF-METHODs,
   as necessary.

11 years agounit tests for case preservation
Alejandro R Sedeño [Tue, 12 Feb 2013 17:56:20 +0000 (12:56 -0500)]
unit tests for case preservation

11 years agoprinter.lisp: consume more arguments when appropriate
Alejandro R Sedeño [Mon, 11 Feb 2013 23:32:17 +0000 (18:32 -0500)]
printer.lisp: consume more arguments when appropriate

Here we should have been consuming both the thing we would be printing
and the indentation we would use on the next line, but in the case
where the printed thing was nil, we would only consume it, and not the
subsequent indentation. It worked out here, but the mistake could only
be made once, and only at the end.

11 years agoprinter.lisp: ~*~* -> ~2*
Alejandro R Sedeño [Mon, 11 Feb 2013 23:31:34 +0000 (18:31 -0500)]
printer.lisp: ~*~* -> ~2*

11 years agoprinter.lisp: don't export symbols not in our package
Alejandro R Sedeño [Mon, 11 Feb 2013 18:23:15 +0000 (13:23 -0500)]
printer.lisp: don't export symbols not in our package

11 years agoparser.lisp: set up fall-back package names
Alejandro R Sedeño [Fri, 4 Jan 2013 20:32:23 +0000 (15:32 -0500)]
parser.lisp: set up fall-back package names

Robert Brown's protobuf package falls back on the java_package option
as the lisp package name when there isn't a package declaration in the
schema. Emulate that behavior for better compatibility between code
generated by the packages.

11 years agoprinter.lisp: Collect exports from messages defned in messages
Alejandro R Sedeño [Fri, 4 Jan 2013 20:32:04 +0000 (15:32 -0500)]
printer.lisp: Collect exports from messages defned in messages

11 years agoprinter.lisp: qualify generated UNLESS, just like the rest of the COMMON-LISP functions
Alejandro R Sedeño [Fri, 4 Jan 2013 20:31:34 +0000 (15:31 -0500)]
printer.lisp: qualify generated UNLESS, just like the rest of the COMMON-LISP functions

11 years agoprinter.lisp: drop trailing whitespace on generated package definition
Alejandro R Sedeño [Fri, 4 Jan 2013 20:30:55 +0000 (15:30 -0500)]
printer.lisp: drop trailing whitespace on generated package definition

11 years agoFix typo in comment
Alejandro R Sedeño [Thu, 3 Jan 2013 20:48:01 +0000 (15:48 -0500)]
Fix typo in comment

11 years agoDon't export RUN-ALL-TESTS if we have test-tools, as it won't be defined.
Alejandro R Sedeño [Thu, 3 Jan 2013 20:33:17 +0000 (15:33 -0500)]
Don't export RUN-ALL-TESTS if we have test-tools, as it won't be defined.

11 years agogeneralize CCL fasl ignores
Alejandro R Sedeño [Thu, 3 Jan 2013 18:46:36 +0000 (13:46 -0500)]
generalize CCL fasl ignores

11 years agoGenerate integer encoders and decoders with thought towards the size of a FIXNUM
Alejandro R Sedeño [Mon, 17 Dec 2012 18:47:55 +0000 (13:47 -0500)]
Generate integer encoders and decoders with thought towards the size of a FIXNUM

Rather than hard-code assumptions about the size of a FIXNUM, check
the size of FIXNUM at compile time and generate code appropriate for
the number of bits we're working with, with FIXNUM optimizations
in place if appropriate.

Includes some changes from swmckay@gmail.com.

11 years agointeger encoding/decoding tests
Alejandro R Sedeño [Thu, 3 Jan 2013 01:09:02 +0000 (20:09 -0500)]
integer encoding/decoding tests

11 years agoAdd a few more fasl types
Scott McKay [Thu, 3 Jan 2013 17:08:03 +0000 (12:08 -0500)]
Add a few more fasl types

11 years agoMerge branch 'master' of git://common-lisp.net/projects/qitab/cl-protobufs
Scott McKay [Thu, 3 Jan 2013 17:07:21 +0000 (12:07 -0500)]
Merge branch 'master' of git://common-lisp.net/projects/qitab/cl-protobufs

Conflicts:
tests/qtest.lisp

11 years agoFix some printers, etc
Scott McKay [Thu, 3 Jan 2013 16:56:08 +0000 (11:56 -0500)]
Fix some printers, etc

11 years agodefine-proto: collect DEFTYPE forms before other forms
Paul Weiss [Wed, 2 Jan 2013 17:00:53 +0000 (12:00 -0500)]
define-proto: collect DEFTYPE forms before other forms

Signed-off-by: Alejandro R Sedeño <asedeno@google.com>
11 years agoTweak definition of ASSERT-EQUAL
Alejandro R Sedeño [Mon, 17 Dec 2012 19:50:37 +0000 (14:50 -0500)]
Tweak definition of ASSERT-EQUAL

11 years agoMerge branches 'extend-logic' and 'type-aliases'
Alejandro R Sedeño [Mon, 17 Dec 2012 19:33:00 +0000 (14:33 -0500)]
Merge branches 'extend-logic' and 'type-aliases'

11 years agoThe parent of an extended message is the context in which it was defined
Alejandro R Sedeño [Mon, 17 Dec 2012 00:14:36 +0000 (19:14 -0500)]
The parent of an extended message is the context in which it was defined

11 years agoWhen extending, find extended message by type rather than unqualified name
Alejandro R Sedeño [Sun, 16 Dec 2012 23:01:45 +0000 (18:01 -0500)]
When extending, find extended message by type rather than unqualified name

11 years agoTest various extend scenario
Alejandro R Sedeño [Fri, 14 Dec 2012 19:05:29 +0000 (14:05 -0500)]
Test various extend scenario

Inspired by:
https://developers.google.com/protocol-buffers/docs/proto#extensions

Nested Extensions:

"A common pattern is to define extensions inside the scope of the
 extension's field type – for example, here's an extension to Foo of
 type Baz, where the extension is defined as part of Baz"

11 years agohonor type-aliases when looking up types
Alejandro R Sedeño [Fri, 14 Dec 2012 23:24:05 +0000 (18:24 -0500)]
honor type-aliases when looking up types

11 years agoAdd a test for type-aliases
Alejandro R Sedeño [Fri, 14 Dec 2012 23:23:36 +0000 (18:23 -0500)]
Add a test for type-aliases

11 years agoMuffle style warnings when generating methods in optimized serialization tests
Alejandro R Sedeño [Sat, 15 Dec 2012 02:18:13 +0000 (21:18 -0500)]
Muffle style warnings when generating methods in optimized serialization tests

11 years agoFix PRINT-OBJECT method for protobuf-extension to actually print range
Alejandro R Sedeño [Sun, 16 Dec 2012 23:01:17 +0000 (18:01 -0500)]
Fix PRINT-OBJECT method for protobuf-extension to actually print range

11 years agogitignore fasls
Alejandro R Sedeño [Sat, 15 Dec 2012 02:21:53 +0000 (21:21 -0500)]
gitignore fasls

11 years agoDon't use the expanded type if it's a protobuf enum
Alejandro R Sedeño [Sat, 15 Dec 2012 01:42:22 +0000 (20:42 -0500)]
Don't use the expanded type if it's a protobuf enum

This fixes the unit test that broke in the previous commit

11 years agoMerge branch 'type-expansion'
Alejandro R Sedeño [Wed, 12 Dec 2012 18:40:59 +0000 (13:40 -0500)]
Merge branch 'type-expansion'

11 years agoexpand types in clos transformation when necessary
Alejandro R Sedeño [Mon, 10 Dec 2012 22:23:48 +0000 (17:23 -0500)]
expand types in clos transformation when necessary

11 years agoTest serialization of a user DEFTYPE
Alejandro R Sedeño [Mon, 10 Dec 2012 22:21:21 +0000 (17:21 -0500)]
Test serialization of a user DEFTYPE

11 years agoMerge branch 'master' of git://common-lisp.net/projects/qitab/cl-protobufs
Scott McKay [Sun, 9 Dec 2012 05:04:07 +0000 (10:34 +0530)]
Merge branch 'master' of git://common-lisp.net/projects/qitab/cl-protobufs

Conflicts:
serialize.lisp

11 years agoDon't send default values when serializing
Scott McKay [Sun, 9 Dec 2012 02:48:57 +0000 (08:18 +0530)]
Don't send default values when serializing

11 years agoasdf-support: change perform for load-op to do all work locally and better use input...
Alejandro R Sedeño [Thu, 6 Dec 2012 19:45:52 +0000 (14:45 -0500)]
asdf-support: change perform for load-op to do all work locally and better use input-files

11 years agoasdf-support: move input-files definitions to more logical locations
Alejandro R Sedeño [Thu, 6 Dec 2012 19:44:41 +0000 (14:44 -0500)]
asdf-support: move input-files definitions to more logical locations

11 years agoMerge branch 'rework-asdf-import'
Alejandro R Sedeño [Wed, 5 Dec 2012 21:15:36 +0000 (16:15 -0500)]
Merge branch 'rework-asdf-import'

Reviewer: tunes

11 years agoprocess new .proto-imports file when compiling and loading components
Alejandro R Sedeño [Wed, 5 Dec 2012 01:33:31 +0000 (20:33 -0500)]
process new .proto-imports file when compiling and loading components

11 years agoFix bogus docstring
Alejandro R Sedeño [Wed, 5 Dec 2012 21:08:59 +0000 (16:08 -0500)]
Fix bogus docstring

11 years agogenerate a list of imports for each .proto file
Alejandro R Sedeño [Tue, 4 Dec 2012 21:23:10 +0000 (16:23 -0500)]
generate a list of imports for each .proto file

11 years agoprinter.lisp: Add missing space to docstring
Alejandro R Sedeño [Wed, 5 Dec 2012 01:31:57 +0000 (20:31 -0500)]
printer.lisp: Add missing space to docstring

11 years agoFix docstring and error-reporting in #'PARSE-PROTO-IMPORT
Alejandro R Sedeño [Tue, 4 Dec 2012 16:13:53 +0000 (11:13 -0500)]
Fix docstring and error-reporting in #'PARSE-PROTO-IMPORT

11 years agoAdd a proper input-files method for proto-to-lisp,
Francois-Rene Rideau [Tue, 4 Dec 2012 01:15:05 +0000 (20:15 -0500)]
Add a proper input-files method for proto-to-lisp,
which shall fix the issue that causes of these actions never being operation-done-p.
However this does NOT handle recursive import dependencies,
which requires further work.

Tested: QRes doesn't always recompile the proto and all dependees anymore.
Reviewer: asedeno

11 years agofix cross-package and forward references in cl-protobufs
Ben Wagner [Tue, 20 Nov 2012 18:43:00 +0000 (13:43 -0500)]
fix cross-package and forward references in cl-protobufs

* 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.

11 years agoGet rid of the warning that vval isn't used in generate-object-size of type-aliased...
Shaun Morris [Mon, 19 Nov 2012 21:41:36 +0000 (13:41 -0800)]
Get rid of the warning that vval isn't used in generate-object-size of type-aliased bools.

11 years agoccl: reverse values from CCL::DOUBLE-FLOAT-BITS
Alejandro R Sedeño [Thu, 15 Nov 2012 23:10:31 +0000 (18:10 -0500)]
ccl: reverse values from CCL::DOUBLE-FLOAT-BITS

11 years agoDon't quote the test name
Alejandro R Sedeño [Thu, 20 Sep 2012 18:08:19 +0000 (14:08 -0400)]
Don't quote the test name

11 years agofix a typo
Alejandro R Sedeño [Thu, 20 Sep 2012 16:00:37 +0000 (12:00 -0400)]
fix a typo

11 years agoccl: Use ccl's float internals
Alejandro R Sedeño [Thu, 20 Sep 2012 16:00:10 +0000 (12:00 -0400)]
ccl: Use ccl's float internals

11 years agoImprove schema generation performance on large schemas
Francois-Rene Rideau [Wed, 7 Nov 2012 23:40:50 +0000 (18:40 -0500)]
Improve schema generation performance on large schemas

Avoid SUBTYPEP during macroexpansion, it can be very expensive on SBCL.
Actually recognize LIST-OF:LIST-OF constructs.
In DEFINE-SCHEMA, don't nest the DEFMETHODs inside the LET,
this also can cause SBCL's control flow analysis to blow up.

Work done with Steven Spitz for QPX.

Tested: (asdf:test-system :cl-protobufs)

11 years agoUpdate a few basic Lisp libraries.
François-René Rideau [Thu, 11 Oct 2012 15:56:21 +0000 (15:56 +0000)]
Update a few basic Lisp libraries.
Testing: [trunk r567444] precheckin --parallel 11  PASSED
Reviewers: dcrawford, asedeno

Rationale: there is a problem in quicklisp due to recent asdf package changes,
that requires urgent fix to cl-protobufs,
so I'm updating these for the sake of issuing
a cl-protobufs fix to quicklisp ASAP.
I require these updates for some further changes I'm making to QUUX, anyway,
so it's just a matter of timing.

git-svn-id: http://svn.internal.itasoftware.com/svn/ita/trunk/qres/lisp/libs/cl-protobufs@567483 f8382938-511b-0410-9cdd-bb47b084005c

11 years agoTweak a few comments
Scott McKay [Wed, 19 Sep 2012 21:51:38 +0000 (21:51 +0000)]
Tweak a few comments

git-svn-id: http://svn.internal.itasoftware.com/svn/ita/trunk/qres/lisp/libs/cl-protobufs@563247 f8382938-511b-0410-9cdd-bb47b084005c

11 years agoThe 'protobufs' package should use no other package, not even CL
Scott McKay [Wed, 19 Sep 2012 19:50:25 +0000 (19:50 +0000)]
The 'protobufs' package should use no other package, not even CL

git-svn-id: http://svn.internal.itasoftware.com/svn/ita/trunk/qres/lisp/libs/cl-protobufs@563209 f8382938-511b-0410-9cdd-bb47b084005c

11 years agoAdd a performance test to the Protobufs test directory
Scott McKay [Wed, 19 Sep 2012 15:21:40 +0000 (15:21 +0000)]
Add a performance test to the Protobufs test directory

git-svn-id: http://svn.internal.itasoftware.com/svn/ita/trunk/qres/lisp/libs/cl-protobufs@563144 f8382938-511b-0410-9cdd-bb47b084005c

11 years agoAdd a performance test to the Protobufs test directory
Scott McKay [Wed, 19 Sep 2012 15:20:09 +0000 (15:20 +0000)]
Add a performance test to the Protobufs test directory

git-svn-id: http://svn.internal.itasoftware.com/svn/ita/trunk/qres/lisp/libs/cl-protobufs@563140 f8382938-511b-0410-9cdd-bb47b084005c

11 years agoSpeed up unoptimized serialization
Scott McKay [Tue, 18 Sep 2012 16:04:09 +0000 (16:04 +0000)]
Speed up unoptimized serialization

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

11 years agoIn case anybody wants to pick off a task...
Scott McKay [Mon, 17 Sep 2012 20:06:10 +0000 (20:06 +0000)]
In case anybody wants to pick off a task...

git-svn-id: http://svn.internal.itasoftware.com/svn/ita/trunk/qres/lisp/libs/cl-protobufs@562757 f8382938-511b-0410-9cdd-bb47b084005c

11 years agoTsunami framework + use tsunami in customer profiles
Sergey Vasilyev [Fri, 14 Sep 2012 18:24:30 +0000 (18:24 +0000)]
Tsunami framework + use tsunami in customer profiles

 Testing : precheckin --full (both against Oracle and against megastore for customers)
 Reviewer: eschwartz

 JTB impact: n
 Ops impact: n
 Security impact: n

 Change to config                        : n
 Change to XML schema                    : Y (XMLREQ bug 120820)
 Change to DB schema                     : Y (DBREQ bug 119801)
 Change to transport (timeouts, headers) : n
 Any change (or new use) of OAQs         : n
 Change to inter-component transactions  : sort of (use megastore in development-only environments)
 Depends on any other checkin / bug      : n

 Tests that will verify : tsunami and megastore unit tests + existing customer profile tests

Tsunami is a new layer that sits between business logic code and the
persistence logic. The main manifestation of this layer is
define-domain-class macro that defines an interface to a domain
class. You can then define how to perist in various implementations,
e.g. using define-quake-db-class-bindings for quake and
define-proto-binding & define-megastore-proto-binding for megastore.

Tsunami framework is still a work in progress, and there is a bunch of
outstanding tasks/issues.

As the first application, I refactored customer profile code to use
the tsunami framework. This enables storing of customer profiles in
megastore (or other data stores in the future), while everything else
is stored in Oracle.

Here is the list of other miscellaneous/harder-to-understand changes:

- I changed @id attribute of ContactInfo objects to use the actual
  numeric ID, rather than passing it through encode-record-locator (in
  qres-dev schema only). This required changing XML schema type from
  typeBasicLocatorString to typeBasicID.

- Drop quake/relationships.lisp. Use a more straightforward way to
  associated ADO agencies to customer profiles.

- Customer usernames are now stored as lowercase strings (this means
  that I don't need a separate field in megastore protobuf to
  implement case-insensitive index).

- agency-id permission attribute is now the agency-key (serialized to
  string), not the agency's record ID. This way you don't need to load
  agency to do permission check when all you have is the agency-key

- moved agency-key from core/agencies.lisp to
  lisp/core/agency-types.lisp, so that agency-key type can be used in
  permissions

- add when* test handler that takes a random Lisp expression (as
  opposed to the existing when that takes a variable name and looks at
  whether it is empty)

- remove cc-deleted-error -- there is no such thing as deleting
  cc-info

- refactored cc-information, so that it is used as a value object (ie
  a mostly-immutable object with no identity) in the application. When
  saving to Oracle database, it is saved in the central
  tbl_cc_information table with appropriately populated ownership
  columns (pointing to the customer, journey,
  accountable_doc_container, etc)

- drop unneeded tbl_cc_transaction columns that were caching cc_info
  values

git-svn-id: http://svn.internal.itasoftware.com/svn/ita/trunk/qres/lisp/libs/cl-protobufs@562275 f8382938-511b-0410-9cdd-bb47b084005c