So, our team is switching to a YAML-based robot config system, in which we construct most of our robot’s objects by deserializing them from a YAML file with Jackson. We’re doing this for a number of reasons: removal of clutter, easier code re-use, better separation of configuration from functionality, etc. We’re quite happy with the system we’ve come up with.
Unfortunately, there is one hiccup: we’d very much like to use YAML’s anchor/merge syntax to remove large quantities of repetition from our config file. Unfortunately, Jackson has no support for this functionality, and the only workaround I know involves first reading our config file into SnakeYAML, which can resolve the anchor/merge syntax, then using Jackson to spit it back out as a YAML string (sans anchors/merges).
However, constructing a Yaml object in SnakeYAML requires java.beans, which is not present on the compact2 version of the JRE that WPILib uses by default.
Currently, we are simply putting a full JRE on the RoboRIO. However, the full JRE has a lot of crud that we don’t need in addition to java.beans, and we’d rather not sacrifice 25MB of memory for no reason.
So, we’re wondering if there’s any reasonable, not-a-horrible-hack way of adding only java.beans to our code. Any help would be greatly appreciated!