Re: Massive libxo-zation that breaks everything

From: Harrison Grundy <harrison.grundy_at_astrodoggroup.com>
Date: Sun, 01 Mar 2015 11:46:49 -0800
On 03/01/15 11:11, David Chisnall wrote:
> On 1 Mar 2015, at 18:49, Harrison Grundy
> <harrison.grundy_at_astrodoggroup.com> wrote:
>> 
>> That does seem useful, but I'm not sure I see the reasoning
>> behind putting into base, over a port or package, since
>> processing XML in base is a pain, and it can't serve up JSON or
>> HTML without additional utilities anyway.
> 
> How would it be in a port?  It involves modifying core utilities
> (some of which, like ifconfig, rely on kernel APIs that change
> between releases) to emit structured output.  Maintaining two
> copies of each utility, one in the base system with plain-text
> output only and another in ports with XML/JSON output would be very
> painful.
> 
> The goal of having machine-readable output in the base system is
> that people building systems atop FreeBSD will be able to expect a
> stable, machine-parsable, extensible, output from these tools.  If
> you're building a web admin GUI or automated administration tool
> for FreeBSD 11, or improving integration in your favourite DE, then
> you should be able to rely on the output from base system tools,
> without having to depend on anything external.
> 
> My only concern with libxo at present is that many of the modified
> tools are not emitting self-describing output (e.g. not specifying
> units for things), but that's something that we have a year to
> shake out before 11.
> 
> David


Thinking about the kernel interfaces, I can see the need for it in
base... but then it boils down to why, say, ifconfig in particular
needs to support this behavior. It seems easier/safer to implement
this independently of the existent commands using the various APIs.

By putting this in the actual base utilities, an API that I would
assume needs to remain relatively static is being introduced that may
have some fairly large consequences for how those utilities need to
operate.

It just seems odd to me to have the same command one would use to,
say, join a wireless network and set an IP also spit out HTML reports
on interfaces. It seems like the needs of those programs may diverge
over time, or that functionality needed for some new ifconfig thing
would then require picking (and being stuck with) an XML schema for
that information at the same time.

--- Harrison
Received on Sun Mar 01 2015 - 18:49:29 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:56 UTC