|
|
@@ -41,14 +41,22 @@ It has the following subdirectories:
|
|
|
`v1 Client Stateless Query Files`_, or `v1 Client Stateful Query Files`_.
|
|
|
|
|
|
``reply/``
|
|
|
- Holds reply files written by CMake whenever it runs to generate a build
|
|
|
- system. These are indexed by a `v1 Reply Index File`_ that may
|
|
|
- reference additional `v1 Reply Files`_. CMake owns all reply files.
|
|
|
- Clients must never remove them.
|
|
|
+ Holds reply files written by CMake when it runs to generate a build system.
|
|
|
+ Clients may read reply files only when referenced by a reply index:
|
|
|
|
|
|
- Clients may look for and read a reply index file at any time.
|
|
|
+ ``index-*.json``
|
|
|
+ A `v1 Reply Index File`_ written when CMake generates a build system.
|
|
|
+
|
|
|
+ ``error-*.json``
|
|
|
+ .. versionadded:: 4.1
|
|
|
+
|
|
|
+ A `v1 Reply Error Index`_ written when CMake fails to generate a build
|
|
|
+ system due to an error.
|
|
|
+
|
|
|
+ Clients may look for and read a reply index at any time.
|
|
|
Clients may optionally create the ``reply/`` directory at any time
|
|
|
- and monitor it for the appearance of a new reply index file.
|
|
|
+ and monitor it for the appearance of a new reply index.
|
|
|
+ CMake owns all reply files. Clients must never remove them.
|
|
|
|
|
|
.. versionadded:: 3.31
|
|
|
Users can add query files to ``api/v1/query`` inside the
|
|
|
@@ -179,7 +187,7 @@ v1 Reply Index File
|
|
|
-------------------
|
|
|
|
|
|
CMake writes an ``index-*.json`` file to the ``v1/reply/`` directory
|
|
|
-whenever it runs to generate a build system. Clients must read the
|
|
|
+when it successfully generates a build system. Clients must read the
|
|
|
reply index file first and may read other `v1 Reply Files`_ only by
|
|
|
following references. The form of the reply index file name is::
|
|
|
|
|
|
@@ -300,8 +308,12 @@ The members are:
|
|
|
A member of this form appears for each of the
|
|
|
`v1 Shared Stateless Query Files`_ that CMake recognized as a
|
|
|
request for object kind ``<kind>`` with major version ``<major>``.
|
|
|
- The value is a `v1 Reply File Reference`_ to the corresponding
|
|
|
- reply file for that object kind and version.
|
|
|
+ The value is
|
|
|
+
|
|
|
+ * a `v1 Reply File Reference`_ to the corresponding reply file for
|
|
|
+ that object kind and version, or
|
|
|
+ * in a `v1 Reply Error Index`_, a JSON object with a single ``error``
|
|
|
+ member containing a string with an error message.
|
|
|
|
|
|
``<unknown>``
|
|
|
A member of this form appears for each of the
|
|
|
@@ -320,8 +332,12 @@ The members are:
|
|
|
A member of this form appears for each of the
|
|
|
`v1 Client Stateless Query Files`_ that CMake recognized as a
|
|
|
request for object kind ``<kind>`` with major version ``<major>``.
|
|
|
- The value is a `v1 Reply File Reference`_ to the corresponding
|
|
|
- reply file for that object kind and version.
|
|
|
+ The value is
|
|
|
+
|
|
|
+ * a `v1 Reply File Reference`_ to the corresponding reply file for
|
|
|
+ that object kind and version, or
|
|
|
+ * in a `v1 Reply Error Index`_, a JSON object with a single ``error``
|
|
|
+ member containing a string with an error message.
|
|
|
|
|
|
``<unknown>``
|
|
|
A member of this form appears for each of the
|
|
|
@@ -375,6 +391,35 @@ using a JSON object with members:
|
|
|
A JSON string specifying a path relative to the reply index file
|
|
|
to another JSON file containing the object.
|
|
|
|
|
|
+.. _`file-api reply error index`:
|
|
|
+
|
|
|
+v1 Reply Error Index
|
|
|
+^^^^^^^^^^^^^^^^^^^^
|
|
|
+
|
|
|
+.. versionadded:: 4.1
|
|
|
+
|
|
|
+CMake writes an ``error-*.json`` file to the ``v1/reply/`` directory
|
|
|
+when it fails to generate a build system. This reply error index
|
|
|
+follows the same naming pattern, syntax, and semantics of a
|
|
|
+`v1 Reply Index File`_, with the following exceptions:
|
|
|
+
|
|
|
+* The ``index-`` prefix is replaced by an ``error-`` prefix.
|
|
|
+
|
|
|
+* When a new error index is generated, old index files are *not*
|
|
|
+ deleted. If a `v1 Reply Index File`_ exists, it indexes replies
|
|
|
+ from the most recent successful run. If multiple ``index-*.json``
|
|
|
+ and/or ``error-*.json`` files are present, the one with the largest
|
|
|
+ name in lexicographic order, excluding the ``index-`` or ``error-``
|
|
|
+ prefix, is the current index.
|
|
|
+
|
|
|
+* Only a subset of `Object Kinds`_ are provided:
|
|
|
+
|
|
|
+ `configureLog <file-api configureLog_>`_
|
|
|
+ .. versionadded:: 4.1
|
|
|
+
|
|
|
+ Index entries for other object kinds contain an ``error`` message
|
|
|
+ instead of a `v1 Reply File Reference`_.
|
|
|
+
|
|
|
v1 Reply Files
|
|
|
--------------
|
|
|
|