In the current version of CL-JSON, defining a json-rpc-function puts the /function/ in a hash-table.
I have been wrestling with testing my json-rpc-2.0 code and find that this structure makes my code hard to debug. In particular, I can't effectively TRACE a function that's exported from cl-json.
How would you feel about putting the symbol that /names/ the function into the hash-table, instead of the function itself?
At the expense of another hash-table lookup, we get the ability to trace our exported functions....
No code change to speak of, since the call to apply will work on the function name as well as the function object.
Best, r
On Wed, Jan 13, 2010 at 11:08 PM, Robert Goldman rpgoldman@sift.info wrote:
In the current version of CL-JSON, defining a json-rpc-function puts the /function/ in a hash-table.
I have been wrestling with testing my json-rpc-2.0 code
Great, I saw you were active on the json-rpc mailing list as well.
and find that
this structure makes my code hard to debug. In particular, I can't effectively TRACE a function that's exported from cl-json.
While you are testing, you might consider coding some testcases at the same time.
How would you feel about putting the symbol that /names/ the function into the hash-table, instead of the function itself?
I don't see any problems with this.
/Henrik
On 1/13/10 Jan 13 -4:29 PM, Henrik Hjelte wrote:
On Wed, Jan 13, 2010 at 11:08 PM, Robert Goldman rpgoldman@sift.info wrote:
In the current version of CL-JSON, defining a json-rpc-function puts the /function/ in a hash-table.
I have been wrestling with testing my json-rpc-2.0 code
Great, I saw you were active on the json-rpc mailing list as well.
and find that
this structure makes my code hard to debug. In particular, I can't effectively TRACE a function that's exported from cl-json.
While you are testing, you might consider coding some testcases at the same time.
Yes, I have been --- I have been extending the existing JSON-RPC tests with others that exercise the new :boolean and :array coding schemes, and also that check both 1.1 and 2.0 behaviors.
I am holding off submitting my patches until such a time as I have those tests in place and passing.
best, r
OK, attached is a darcs patch that changes the way the function table is populated, so that it holds function names, rather than functions.
Next patch will be to add json-rpc 2.0 support.