Discussion:
YAML support infrastructure - libswoc++
Alan Carroll
2018-10-30 16:15:56 UTC
Permalink
While working on the YAML support for ATS, I ended up making quite a lot of
changes and updates to a set of support utilities which are also in ATS. To
avoid problems while the work was in progress, and because it was suggested
at the summit, I copied those utilities to a stand alone repository[1]. I
have been making PRs on ATS to transfer these changes back to the ATS code
base to prepare for bringing in Canned YAML, the schema support for YAML
work in ATS.

Additionally, most of these utilities are also planned to be provided to
out of tree ATS plugins, as they provide a number of capabilities that
would be handy in plugins, not to mention that if plugins will be using
YAML for configuration, all of this infrastructure will be needed.

Due to some concerns about future ABI issues, it was suggested that all of
this infrastructure be treated the same way as YAMLCPP - that is, dropped
"en masse" in to the ATS code base and compiled separately as a library.
Plugins would then be able to get their own drop of that infrastructure and
link to it, as they would for YAMLCPP, thereby avoiding any ABI issues with
the ATS core.

There are PRs up for this now, if anyone wants to take a look.

[1] https://github.com/solidwallofcode/libswoc
--
*Beware the fisherman who's casting out his line in to a dried up riverbed.*
*Oh don't try to tell him 'cause he won't believe. Throw some bread to the
ducks instead.*
*It's easier that way. *- Genesis : Duke : VI 25-28
Bryan Call
2018-10-30 16:31:23 UTC
Permalink
My suggestion was to add the utilities as part of Canned YAML code base and bring in Canned YAML as a single library. I don’t think it makes sense to have two separate libraries (libswoc and canned YAML). This way anyone who would want to use a C++ schema validation library for YAML can easily download the Canned YAML library independently.

The other option If you don’t want Canned YAML to be a independent library, which I don’t think is a good idea, would be to use the utilities provided by ATS (both internal and external APIs) and provide an external API for only the schema validation.

I think there is a lot of merit in having C++ schema validation library for YAML. My hope is that other people would use it on other projects and contribute to it.

-Bryan
Post by Alan Carroll
While working on the YAML support for ATS, I ended up making quite a lot of
changes and updates to a set of support utilities which are also in ATS. To
avoid problems while the work was in progress, and because it was suggested
at the summit, I copied those utilities to a stand alone repository[1]. I
have been making PRs on ATS to transfer these changes back to the ATS code
base to prepare for bringing in Canned YAML, the schema support for YAML
work in ATS.
Additionally, most of these utilities are also planned to be provided to
out of tree ATS plugins, as they provide a number of capabilities that
would be handy in plugins, not to mention that if plugins will be using
YAML for configuration, all of this infrastructure will be needed.
Due to some concerns about future ABI issues, it was suggested that all of
this infrastructure be treated the same way as YAMLCPP - that is, dropped
"en masse" in to the ATS code base and compiled separately as a library.
Plugins would then be able to get their own drop of that infrastructure and
link to it, as they would for YAMLCPP, thereby avoiding any ABI issues with
the ATS core.
There are PRs up for this now, if anyone wants to take a look.
[1] https://github.com/solidwallofcode/libswoc
--
*Beware the fisherman who's casting out his line in to a dried up riverbed.*
*Oh don't try to tell him 'cause he won't believe. Throw some bread to the
ducks instead.*
*It's easier that way. *- Genesis : Duke : VI 25-28
Alan Carroll
2018-10-30 17:09:23 UTC
Permalink
I think a problem here is Canned YAML isn't a library, it's an application.
It reads schemas and generates C++ code. It is not itself linked in to
anything. We could actually use it completely outside of ATS and only check
in the generated code. However, the generated code depends on what is
effectively libswoc++. Because of that, and because those utilities are
useful in situations other than supporting Canned YAML, it's a separate
project that provides the library and are in fact used both in the ATS core
and plugins. In essence, libswoc++ is the Canned YAML library. I think this
is the cleanest approach.

P.S. It would be possible to make Canned YAML a web app, where you paste in
your schema, it generates the code, and then you put that result in your
project, never downloading or building Canned YAML at all.

Loading...