diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-05-08 10:43:40 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-05-09 15:37:33 +0200 |
commit | 00df206af5c80aba31bf7d180bdf03d617071e94 (patch) | |
tree | 00a637e6d78e7f8e9de323a0804df59c403120ef /libbuild2/variable.hxx | |
parent | 7a458f210f296cb3cc1551a4606f0cf025003f3a (diff) |
Add support for dumping build system state in JSON format (GH issue #182)
Specifically:
1. New --dump-format option. Valid values are `buildfile` and `json-v0.1`.
2. The --dump option now recognizes two additional values: `match-pre` and
`match-post` to dump the state of pre/post-operations. The `match` value
now only triggers dumping of the main operation.
Diffstat (limited to 'libbuild2/variable.hxx')
-rw-r--r-- | libbuild2/variable.hxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libbuild2/variable.hxx b/libbuild2/variable.hxx index b137789..3220a62 100644 --- a/libbuild2/variable.hxx +++ b/libbuild2/variable.hxx @@ -944,7 +944,7 @@ namespace build2 // pair of two empties). // // @@ Maybe we should redo this with optional<> to signify which half can - // be missing? + // be missing? See also dump_value(json). // template <> struct LIBBUILD2_SYMEXPORT value_traits<name_pair> @@ -1213,6 +1213,8 @@ namespace build2 // value type objects for the same traits type (and we use their addressed // as identity; see cast(const value&) for an example). // + // NOTE: REMEMBER TO UPDATE dump_value(json) IF CHANGING ANYTHING HERE! + // extern template struct LIBBUILD2_DECEXPORT value_traits<strings>; extern template struct LIBBUILD2_DECEXPORT value_traits<vector<name>>; extern template struct LIBBUILD2_DECEXPORT value_traits<paths>; |