[waffle] [wflinfo] [RFC] platform-specific info from wflinfo

Dylan Baker baker.dylan.c at gmail.com
Fri Apr 10 11:21:10 PDT 2015


On Fri, Apr 10, 2015 at 10:05:32AM -0400, Frank Henigman wrote:
> Sorry I let this thread get stale.
> 
> > On 02/20/2015 01:49 PM, Jordan Justen wrote:
> >> My idea was just to define a one-time API that left presentation of
> >> the strings to the user of the library. Therefore, the Core API
> >> wouldn't ever need to change past that point. It was also an attempt
> >> to make it fairly easy to iterate through the results.
> 
> I couldn't agree with this more.  I was being a bit lazy in my
> thinking before but I've seen the light.
> So we want the core to provide information in a form that can be
> used/presented by the caller as they like.
> So why not just provide JSON?  It's simple (just returns a string) and
> future-proof (new key/value pairs can be added for those who want them
> and ignored by others) and there are numerous libraries for processing
> JSON.
> I think it's the only core info API we need.
> Then wflinfo can be re-implemented (preferably in python) as something
> that gets the JSON string from the library and presents it in one or
> more ways similar to what wflinfo does now.
> Those who are already parsing glxinfo or wflinfo output can continue
> to do that, but will now have the option of parsing the JSON, which
> should be more robust.  I think we can also make the raw JSON friendly
> to simple grepping, with judiciously placed newlines.
> If there are no objections to this plan, I'll work on an implementation.

Getting json back would be fantastic for piglit. While we're at it,
would it be possible to extend wflinfo to return it's existing data as
json too?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/waffle/attachments/20150410/93b62cdc/attachment.sig>


More information about the waffle mailing list