Skip to content

feat: Offer --cache option to control cache mode (Incremental Build)#1368

Open
maxreichmann wants to merge 4 commits intofeat/incremental-build-4from
feat/incremental-build-cache-mode
Open

feat: Offer --cache option to control cache mode (Incremental Build)#1368
maxreichmann wants to merge 4 commits intofeat/incremental-build-4from
feat/incremental-build-cache-mode

Conversation

@maxreichmann
Copy link
Copy Markdown
Member

@maxreichmann maxreichmann commented Apr 28, 2026

Part of Incremental Build: #1267

JIRA: CPOUI5FOUNDATION-1208

  • Introduce --cache with values "Default", "ReadOnly", "Force" and "Off" for commands "ui5 build" and "ui5 serve"
    • Add yargs help description (also appears in CLI docs)
  • Add JSDoc annotations
  • Rename --cache-mode to --snapshot-cache
    • Hide deprecated option in yargs help (if still used -> logs warning)
    • Legacy logic now usable via new name
    • Add hint under "Migrate to v5" in docs explaining this

@maxreichmann maxreichmann force-pushed the feat/incremental-build-cache-mode branch from 13173d5 to 68a130f Compare April 29, 2026 07:39
@maxreichmann maxreichmann marked this pull request as draft April 29, 2026 07:42
@maxreichmann maxreichmann force-pushed the feat/incremental-build-cache-mode branch from 68a130f to 0c087f8 Compare April 29, 2026 08:23
@RandomByte RandomByte force-pushed the feat/incremental-build-4 branch from e1d781f to ab65f27 Compare April 30, 2026 12:19
Comment thread packages/cli/lib/cli/commands/build.js Outdated
"As of UI5 CLI version 5, renamed to '--snapshot-cache'. " +
"Use '--snapshot-cache' to control this behavior.",
type: "string",
hidden: true, // Hides it from the help output
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the choices so that no arbitrary strings can be provided

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in b69c8b1

Comment thread packages/cli/lib/cli/commands/build.js Outdated
rootConfigPath: argv.config,
versionOverride: argv.frameworkVersion,
cacheMode: argv.cacheMode,
snapshotCache: argv.snapshotCache,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The legacy cacheMode parameter should be used as fallback if snapshotCache has not been provided and cacheMode has been provided by the user

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in b69c8b1

@maxreichmann maxreichmann force-pushed the feat/incremental-build-4 branch from 7aa4cd3 to 95fd5de Compare May 5, 2026 13:14
@maxreichmann maxreichmann force-pushed the feat/incremental-build-cache-mode branch from e451d07 to 07a5941 Compare May 7, 2026 15:25
@maxreichmann maxreichmann marked this pull request as ready for review May 7, 2026 15:31
@maxreichmann maxreichmann force-pushed the feat/incremental-build-cache-mode branch from bbf7099 to 39431de Compare May 7, 2026 15:32
@maxreichmann maxreichmann requested a review from RandomByte May 7, 2026 15:32
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