Skip to content

fix(project): Include @ui5/project version in build signature - #1550

Merged
RandomByte merged 3 commits into
mainfrom
fix/build-sig-include-ui5-project-version
Aug 25, 2026
Merged

fix(project): Include @ui5/project version in build signature#1550
RandomByte merged 3 commits into
mainfrom
fix/build-sig-include-ui5-project-version

Conversation

@RandomByte

@RandomByte RandomByte commented Aug 25, 2026

Copy link
Copy Markdown
Member

Add the @ui5/project package version to the project build signature so a
changed project package invalidates existing build caches.

getProjectSignature was synchronous and concatenated getPackageVersion()
directly into the hash key. However, getPackageVersion is async, so the Promise
coerced to the constant string "[object Promise]" and the version never
entered the hash. The same line also stringified taskRepository.getVersions()
without awaiting it, so JSON.stringify saw a Promise and produced "{}",
meaning the @ui5/builder and @ui5/fs versions had likewise never contributed
to the signature.

Make getProjectSignature async and await both lookups. Its only production
caller, ProjectBuildContext.create(), is already async and now awaits it.

Add a dedicated test for getBuildSignature.js covering the exact hash key
and asserting that changing either the @ui5/project version or the
taskRepository versions changes the signature, which the previous tests did
not exercise.

Also update internal agent skills:

  • docs(project): Update incremental-build skill for recent changes
  • docs(project): Describe watcher behavior without bug-fix narration

Add the @ui5/project package version to the project build signature so a
changed project package invalidates existing build caches.

getProjectSignature was synchronous and concatenated getPackageVersion()
directly into the hash key. getPackageVersion is async, so the Promise
coerced to the constant string "[object Promise]" and the version never
entered the hash. The same line also stringified taskRepository.getVersions()
without awaiting it, so JSON.stringify saw a Promise and produced "{}",
meaning the @ui5/builder and @ui5/fs versions had likewise never contributed
to the signature.

Make getProjectSignature async and await both lookups. Its only production
caller, ProjectBuildContext.create(), is already async and now awaits it.

Add a dedicated test for getBuildSignature.js covering the exact hash key
and asserting that changing either the @ui5/project version or the
taskRepository versions changes the signature, which the previous tests did
not exercise.
Correct statements in the incremental-build skill that had drifted from
the current implementation:

- Build signature: task-provided signatures are no longer "planned but
  not yet integrated". getProjectSignature() now folds in the aggregated
  task determineBuildSignature() contributions from
  TaskDefinitions.getBuildSignatures(), plus the effective @ui5/builder
  and @ui5/fs versions.
- File watching: no longer exclusively @parcel/watcher. All three
  watchers subscribe through the new fileWatcher facade, which selects a
  native or polling backend (UI5_WATCH_MODE / container auto-detection).
  Add fileWatcher and pollingWatcher to the Component Map.
- CacheManager: note there is no automatic eviction; cleanCache() ->
  dropAllRecords() (backing ui5 cache clean) is the only cleanup, with a
  deferred VACUUM.
Trim three passages in the incremental-build architecture doc that narrated
past fixes or contrasted against prior behavior instead of stating the current
architecture: the WatchHandler "instead of escalating to a fatal error" clause,
the BuildServer.create() "closes a race ... would otherwise be missed" rationale
(also removing an em-dash), and the SETTLING "they no longer park the banner"
aside.
@RandomByte RandomByte changed the title fix/build sig include ui5 project version fix(project): Include @ui5/project version in build signature Aug 25, 2026
@RandomByte
RandomByte requested a review from a team August 25, 2026 14:44
@RandomByte
RandomByte merged commit 788de05 into main Aug 25, 2026
78 checks passed
@RandomByte
RandomByte deleted the fix/build-sig-include-ui5-project-version branch August 25, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants