You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//Map of logical paths written to their content hashes
151
+
//Logical paths written by the task during execution, mapped to their cache metadata
150
152
"/resources/project/namespace/Component.js": {
151
153
"mtime":176468853453,
152
154
"size":4567,
@@ -161,25 +163,25 @@ The cache consists of two main parts:
161
163
162
164
The concept of a `build-manifest.json` has already been explored in [RFC 0011 Reuse Build Results](https://github.com/SAP/ui5-tooling/pull/612) and found an implementation for consumption of pre-built UI5 framework libraries in [UI5 3.0](https://github.com/UI5/cli/pull/612).
163
165
164
-
This concept reuses and extends the `build-manifest.json` idea to also include incremental build cache information. A new `cache` section is added to the manifest, containing all relevant metadata for the incremental build cache.
166
+
This concept reuses and extends the `build-manifest.json` idea to also include incremental build cache information. In addition to a new `signature` attribute, added to the `buildManifest` section (which now defines version `1.0`), a new `cache` section is introduced, containing all relevant metadata for the incremental build cache.
165
167
166
-
##### Integrity
168
+
##### Signature
167
169
168
-
The cache integrity is calculated based on the **build configuration and environment** of a project. It's purpose is to easily tell whether a cache can be reused for a project build or not.
170
+
The signature is calculated based on the **build configuration and environment** of a project. It's purpose is to easily tell whether a cache can be reused for a project build or not.
169
171
170
-
The integrity is a simple hash (represented as a hexadecimal string), calculated from the following information:
172
+
The signature is a simple hash (represented as a hexadecimal string, to allow usage in file names), calculated from the following information:
171
173
172
-
* Project namespace and version.
173
-
* Different projects must produce different caches.
174
+
* Project namespace and version
175
+
* Different projects must produce different caches
174
176
* The versions of all UI5 CLI packages used to create the cache: `@ui5/project`, `@ui5/builder` and `@ui5/fs`
175
-
* Different UI5 CLI versions must produce a new cache. Alternatively, we could introduce a dedicated "cache version" that is incremented whenever a breaking change to the cache format is introduced. This would allow reusing the cache across minor UI5 CLI updates.
176
-
* The relevant build configuration (ui5.yaml + CLI parameters).
177
-
* Changes in the build configuration must result in dedicated cache.
178
-
* Some configuration options might not be relevant for the build process (e.g. server configuration). Those could be excluded from the hash calculation to improve cache reusability.
179
-
* The names and versions of all UI5 extensions in the dependency tree.
180
-
* Changes to custom tasks must invalidate the cache. Even changes to their npm dependencies might invalidate the cache. Therefore, a hash of the current project's lockfile (e.g. package-lock.json, yarn.lock or pnpm-lock.yaml - if present) should be included in the cache key as well.
181
-
*_**To be decided:** The names and versions of all UI5 projects in the dependency tree._
182
-
* Changes in project dependencies might affect the build result of the current project. However, relying on resource-level cache invalidation might be sufficient to detect such changes.
177
+
* Different UI5 CLI versions must produce a new cache. Alternatively, we could introduce a dedicated "cache version" that is incremented whenever a breaking change to the cache format is introduced. This would allow reusing the cache across minor UI5 CLI updates
178
+
* The relevant build configuration (ui5.yaml + CLI parameters)
179
+
* Changes in the build configuration must result in dedicated cache
180
+
* Some configuration options might not be relevant for the build process (e.g. server configuration). Those could be excluded from the hash calculation to improve cache reusability
181
+
* The names and versions of all UI5 extensions in the dependency tree
182
+
* Changes to custom tasks must invalidate the cache. Even changes to their npm dependencies might invalidate the cache. Therefore, a hash of the current project's lockfile (e.g. package-lock.json, yarn.lock or pnpm-lock.yaml - if present) should be included in the cache key as well
183
+
*_**To be decided:** The names and versions of all UI5 projects in the dependency tree_
184
+
* Changes in project dependencies might affect the build result of the current project. However, relying on resource-level cache invalidation might be sufficient to detect such changes
183
185
184
186
##### Index
185
187
@@ -204,7 +206,7 @@ It can also be used to protect against race conditions such as those described i
204
206
205
207
##### Tasks
206
208
207
-
An object containing entries for each build task executed during the build process.
209
+
An object containing entries for each build task executed during the build process. Keys must be stored in the order of task execution.
208
210
209
211
For each task, the following information is stored:
0 commit comments