Build cache: task filters pollute cache keys for unaffected projects
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 64/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript
- Domain
- build-system, cli
Research direction
Start with BuildContext and ProjectBuildContext, following getBaseSignature, getProjectSignature, and composeTaskList. Verify how resolved task lists affect each project's cache signature, then test that irrelevant include or exclude filters produce the same key and avoid an unnecessary rebuild.
Written by the indexing model from the issue text.
Description
Expected Behavior
Filters that don't affect a project's effective task list should not change its cache key.
Current Behavior
--include-task / --exclude-task are baked verbatim into the build base signature
shared across every project in the graph. Filters irrelevant to a project (e.g. a task that
doesn't exist for that project type) still change its cache key, causing unnecessary rebuilds
when building the same project via different entry points.
Root cause
BuildContext computes _buildSignatureBase from the raw includedTasks/excludedTasks
arrays and passes it unchanged to every ProjectBuildContext. But composeTaskList only
applies a filter when the task exists in the project's allTasks — so two builds with
different but equally-irrelevant filters produce identical effective task lists yet different
cache keys.
Steps to Reproduce the Issue
- Build a root
applicationwith--include-task generateVersionInfo. Dependent libraries
cache under a signature encodingincludedTasks: ["generateVersionInfo"]. generateVersionInfodoesn't exist forlibraryprojects — no effect on their builds.- Build a library standalone (no flag). Signature now has
includedTasks: []→ cache miss
→ full rebuild despite identical inputs and identical effective task list.
Fix direction
Move include/exclude contribution from getBaseSignature into the per-project signature
(getProjectSignature), keyed on the resolved output of composeTaskList rather than the
raw filter arrays.
Context
- UI5 Module Version (output of
ui5 --versionwhen using the CLI):5.0.0-alpha.7
- Dominant language
- JavaScript
- Stars
- 510
- Forks
- 80
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 12
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from UI5/cli
-
Build cache: buildThemes cache is invalidated by irrelevant library.js / .library content changesOpenmodule/ui5-builder module/ui5-fs module/ui5-project
Difficulty 3/5 1-2 days Newbie friendliness 76/100
Maintainers usually reply within 2 days
-
[ROADMAP] UI5 CLI 6.0 / Specification Version 6.0May be free again @flovogt claimed this 116 days ago, and no pull request is open. Openroadmap
UI5/cli#1485 · 1 reaction · 1 assignee ·
Maintainers usually reply within 2 days
-
build excludes from application project are not applied to dependenciesMay be free again @flovogt claimed this 90 days ago, and no pull request is open. Open
UI5/cli#1446 · 3 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
help provided
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
Maintainers usually reply within 2 days
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
laaielichter/AgentHaven#294 ·
Maintainers usually reply within 1 day
-
documentation P3 tests
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
cafebugado/backendeventos-public-api#128 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/OpenSearch-Dashboards#13289 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
erkamyaman/rea-games#246 ·
Maintainers usually reply within 1 day