diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-05-09 15:22:52 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-05-09 15:37:51 +0200 |
commit | a933cdeb0c674409bbd52757bcef314fd8bddb46 (patch) | |
tree | 29faa693465406a401a9a741c8637fb546387fa7 /libbuild2/b.cli | |
parent | a0628f5c2968d6bb904c52f9a06a16c679f92e70 (diff) |
Make quoted/display target names in JSON structured result consistent with dump
Specifically, before we had `target` (display) and `quoted_target` and now
we have `target` (quoted) and `display_target`.
Diffstat (limited to 'libbuild2/b.cli')
-rw-r--r-- | libbuild2/b.cli | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/libbuild2/b.cli b/libbuild2/b.cli index 1c994df..f58b869 100644 --- a/libbuild2/b.cli +++ b/libbuild2/b.cli @@ -706,8 +706,8 @@ namespace build2 outer operation is specified in parenthesis. For example: \ - unchanged perform update(test) /tmp/dir{hello/} - changed perform test /tmp/hello/exe{test} + unchanged perform update(test) /tmp/hello/hello/exe{hello} + changed perform test /tmp/hello/hello/exe{hello} \ If the output format is \cb{json}, then the output is a JSON array of @@ -718,7 +718,7 @@ namespace build2 struct target_action_result { string target; - string quoted_target; + string display_target; string target_type; optional<string> target_path; string meta_operation; @@ -733,20 +733,20 @@ namespace build2 \ [ { - \"target\": \"/tmp/dir{hello/}\", - \"quoted_target\": \"/tmp/dir{hello/}\", - \"target_type\": \"dir\", - \"target_path\": \"/tmp/hello\", + \"target\": \"/tmp/hello/hello/exe{hello.}\", + \"display_target\": \"/tmp/hello/hello/exe{hello}\", + \"target_type\": \"exe\", + \"target_path\": \"/tmp/hello/hello/hello\", \"meta_operation\": \"perform\", \"operation\": \"update\", \"outer_operation\": \"test\", \"state\": \"unchanged\" }, { - \"target\": \"/tmp/dir{hello/}\", - \"quoted_target\": \"/tmp/dir{hello/}\", - \"target_type\": \"dir\", - \"target_path\": \"/tmp/hello\", + \"target\": \"/tmp/hello/hello/exe{hello.}\", + \"display_target\": \"/tmp/hello/hello/exe{hello}\", + \"target_type\": \"exe\", + \"target_path\": \"/tmp/hello/hello/hello\", \"meta_operation\": \"perform\", \"operation\": \"test\", \"state\": \"changed\" @@ -758,12 +758,14 @@ namespace build2 properties of this format and the semantics of the \cb{struct} serialization. - The \cb{target} member is a \"display\" target name, the same as in the - \cb{lines} format. The \cb{quoted_target} member is a target name that, - if required, is quoted so that it can be passed back to the driver on - the command line. The \cb{target_type} member is the type of target. - The \cb{target_path} member is an absolute path to the target if the - target type is path-based or \cb{dir}. + The \cb{target} member is the target name that is qualified with the + extension (if applicable) and, if required, is quoted so that it can be + passed back to the build system driver on the command line. The + \cb{display_target} member is the unqualified and unquoted \"display\" + target name, the same as in the \cb{lines} format. The \cb{target_type} + member is the type of target. The \cb{target_path} member is an + absolute path to the target if the target type is path-based or + \cb{dir}. " } |