-
Notifications
You must be signed in to change notification settings - Fork 83
feat: Disable generation of library manifest #1533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
7169840
5e71d46
105bb67
f00c99b
f289522
e9d4b9c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,6 +43,23 @@ UI5 CLI 5.x introduces **Specification Version 5.0**, which enables the new Comp | |
|
|
||
| Projects using older **Specification Versions** are expected to be **fully compatible with UI5 CLI v5**. | ||
|
|
||
| ## generateLibraryManifest Task No Longer Executed | ||
|
|
||
| ::: info Specification Version 5.0 only | ||
| This change only applies to library projects that upgrade their `specVersion` to `5.0` in `ui5.yaml`. Projects on **Specification Version 4.0 and lower are not affected**. | ||
| ::: | ||
|
|
||
| With **Specification Version 5.0**, the [`generateLibraryManifest`](../api/module-@ui5_builder_tasks_generateLibraryManifest) build task is no longer executed. Libraries must provide a `manifest.json` directly in their source directory. | ||
|
|
||
| **Action required** when upgrading a library project to Specification Version 5.0: | ||
|
|
||
| - Ensure your library has a hand-crafted `manifest.json` in its source directory. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldn't it be a good suggestion to run a build and copy the generated |
||
| - If no `manifest.json` is present, the build will no longer generate one automatically. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we know which consequences this would have? I tested it and did not get any warning or error, so I would assume people can easily miss this when upgrading to specVersion 5.0 without checking all details. |
||
|
|
||
| ::: tip | ||
| To see which standard tasks are executed for each project type, check out the [Standard Tasks](../pages/Builder#standard-tasks) table in the UI5 Builder page. | ||
| ::: | ||
|
|
||
| ## Build Cache | ||
|
|
||
| UI5 CLI v5 introduces **builds with caching** for both the `ui5 build` and `ui5 serve` commands. This fundamental architectural change significantly improves build performance by reusing cached results from previous builds. It also simplifies development with the server by making most custom middleware obsolete. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,7 +95,12 @@ export default function({project, taskUtil, getTask}) { | |
| } | ||
| }); | ||
|
|
||
| tasks.set("generateLibraryManifest", {}); | ||
| // For specVersion 5.0+, only execute for framework libraries | ||
| if (project.getSpecVersion().lt("5.0") || project.isFrameworkProject()) { | ||
| tasks.set("generateLibraryManifest", {}); | ||
| } else { | ||
| tasks.set("generateLibraryManifest", {taskFunction: null}); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Apparently, the cache is not invalidated if a project now runs into this line. This means the old cache will be re-used (e.g. when already using specVersion 5.0 and then upgrading to a new pre-release that contains this change). Those are the changes we have to watch out for, as using a stale cache is a bug that is often hard to find. We should maybe even invest into automated tests to ensure caching works as expected. We have different options to resolve this. Bumping |
||
| } | ||
|
|
||
| tasks.set("enhanceManifest", {}); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no longer executed by defaultcan give the impression that there is a way to still execute it. But I assume there isn't, right? (except for the framework projects, which are not mentioned here but maybe should be mentioned?).Background:
Using
--include-task generateLibraryManifestwon't make a difference as this change makes the task a "no-op" instead of disabling it (composeTaskList). The task still exists and is included by default (so custom tasks can still refer to it, and that it still runs for specVersion < 5.0 / framework projects in the tree), but otherwise it is a no-op.I think this is the best solution without inventing new concepts or changing a lot of existing code.