[Webkit-unassigned] [Bug 56294] Web Inspector: migrate from Inspector.idl to InspectorAPI.json for protocol schema definition meta bug.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 18 00:15:46 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=56294





--- Comment #3 from Pavel Feldman <pfeldman at chromium.org>  2011-03-18 00:15:46 PST ---
(In reply to comment #1)
> I'd vote for leaving it has IDL, and adding more to it:
> - describe all the data structures with the IDL
> - documentation in comments preceding the interfaces, functions, and structures ala JavaDoc

The only code that we could reuse for that is perl generator for webkit's variation of idl. I would not want to invest into this technology.

> I already have a python IDL to JSON converter, here:
> 
>    https://github.com/pmuellr/weinre/blob/master/weinre.build/scripts/simple-idl2json.py

It is not clear which JSON we end up using, so I modified our doc gen a bit to generate one. It took me 20 minutes to do that (inserted as an excuse for not using yours).

> - import the simplejson package into WebKit and use it (the official json package for python IS simplejson)
> 
> - use python's "repr" function to generate JSON from python dictionaries - I think it will generate legal JSON for the limited needs here.  Likewise, I believe you can "eval" JSON in Python and get the appropriate thing read in.

I'll need to learn python setup across the bots.

> Lastly, you should check with Joe Gregorio (Google Chapel Hill NC office), as he's working on the standardization of "Google Data APIs" or whatever, and will surely have some ideas for you.  I believe JSON is the common base they are working on also.

> I guess I'd almost prefer we move to Protocol Buffers, as they seem to be a perfect fit for this problem.  Getting Protocol Buffers into WebKit seems like it might be difficult though.

Yeah.

(In reply to comment #2)
> As described here, the InspectorAPI.json file that includes documentation will be bigger than it needs to be - the runtime doesn't need the documentation, for example.

I was not saying we should make this json a part of the runtime. It is just the source for generation.

> What I ended up doing was generating two JSON files - one that is used to generate documentation, the other is used at runtime.  In my case, the JSON went from something like 200K to 30K.  The numbers are a bit inflated as I was adding white space to the 200K version as well, which I removed from the 30K version.

Given above, I think we can keep things co-located.


I'll attach the draft of the JSON I generated off the IDL shortly.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list