refactor(project): Add TaskDefinitions and task-level build signatures#1412
Merged
Conversation
a35ade0 to
250e4fc
Compare
matz3
reviewed
Jun 15, 2026
Extract the task-list construction out of TaskRunner into a new TaskDefinitions class which owns the project-type to build-definition switch, the standard task map, and the custom task validation and de-duplication loop. Each standard task in a build definition can expose an async `determineBuildSignature()` returning a string contribution; the fallback is `JSON.stringify(taskDef.options)`. Custom tasks expose the same via the `determineBuildSignature` named export of their module, surfaced through `Task#getDetermineBuildSignatureCallback`, and must declare specVersion >= 5.0 to use it. `getProjectSignature` mixes the aggregated string in alongside the existing inputs. Split ProjectBuildContext into a synchronous wiring phase (logger, TaskUtil, TaskDefinitions) and a static `create()` that resolves task signatures, computes the project signature, and constructs the ProjectBuildCache. `create()` parameters are reordered to `(buildContext, project, baseSignature, cacheManager)`. Add `TaskUtil#getReadOnlyInterface(specVersion)` for passing into the `determineBuildSignature` callback before the task has run.
8ebbe9c to
ee6d9e2
Compare
…er-safe
The API sidebar in .vitepress/config.ts is built by walking
fs.readdirSync("docs/api") and merging entries into a tree. Two issues
were causing failures and inconsistencies:
- readdirSync returns entries in filesystem order (insertion order on
Linux, alphabetical on macOS APFS). When a "module-..." leaf file
was processed before a sibling that needed to nest under the same
name (e.g. module-@ui5_logger.md before @ui5_logger_Logger.md), the
recursion crashed with "Cannot read properties of undefined (reading
'push')" because the leaf had no items array. This broke the
build:vitepress step on GitHub Actions.
- Even when it succeeded, sibling order in the generated sidebar
varied across platforms.
Fixes:
- Sort the readdir result so the input order — and therefore the
resulting tree — is identical across filesystems.
- Make appendToTree defensive: when a leaf and a branch share a name,
merge them by promoting the leaf to a branch and attaching the
module doc as a 'main' child, in either order. This keeps the build
working even if the sort is removed or the file set changes.
matz3
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extract the task-list construction out of TaskRunner into a new
TaskDefinitions class which owns the project-type to build-definition
switch, the standard task map, and the custom task validation and
de-duplication loop.
Each standard task in a build definition can expose an async
determineBuildSignature()returning a string contribution; thefallback is
JSON.stringify(taskDef.options). Custom tasks expose thesame via the
determineBuildSignaturenamed export of their module,surfaced through
Task#getDetermineBuildSignatureCallback, and mustdeclare specVersion >= 5.0 to use it.
getProjectSignaturemixes theaggregated string in alongside the existing inputs.
Split ProjectBuildContext into a synchronous wiring phase (logger,
TaskUtil, TaskDefinitions) and a static
create()that resolves tasksignatures, computes the project signature, and constructs the
ProjectBuildCache.
create()parameters are reordered to(buildContext, project, baseSignature, cacheManager).Add
TaskUtil#getReadOnlyInterface(specVersion)for passing into thedetermineBuildSignaturecallback before the task has run.Also Include builder and fs version into project build signature.