commit | ec5ba986ae8d0c3901b1fa3179eba2331900743e | [log] [tgz] |
---|---|---|
author | Dan Willemsen <dwillemsen@google.com> | Tue Sep 06 17:20:57 2016 -0700 |
committer | Dan Willemsen <dwillemsen@google.com> | Fri Sep 09 13:19:47 2016 -0700 |
tree | b357b1933c3adaa98478e8262638862fcfb086fc | |
parent | 4a35b51495b7391af1d072d2aa03f124d17c5a7a [diff] |
Support structures built with StructOf In Go 1.7, all generated types (including StructOf) are marked as unexported types. This is not a problem with regular named fields, since the whether the field is exported is based on the name, not the type. But for unnamed (anonymous) fields, there is no name, and it falls back to whether the type is exported or not. When the field isn't exported, we're unable to use reflection to set the value. Special case fields named "BlueprintEmbed" to act like exported unnamed fields during unpacking. There is no functionality lost here, since code can not directly access these runtime generated fields. Structures embedded in the source shouldn't be affected by this change, unless they happen to use the "BlueprintEmbed" field, which is not a normal field name due to the capitalization. Change-Id: I53f3b32b2286c47b2bb1918d6008d0180ad0605e
Blueprint is a meta-build system that reads in Blueprints files that describe modules that need to be built, and produces a Ninja manifest describing the commands that need to be run and their dependencies. Where most build systems use built-in rules or a domain-specific language to describe the logic for converting module descriptions to build rules, Blueprint delegates this to per-project build logic written in Go. For large, heterogenous projects this allows the inherent complexity of the build logic to be maintained in a high-level language, while still allowing simple changes to individual modules by modifying easy to understand Blueprints files.