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

Frank Henigman fjhenigman at google.com
Fri Apr 10 07:05:32 PDT 2015


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.


More information about the waffle mailing list