feat: Disable generation of library manifest - #1533
Conversation
|
Hi @KlattG Would you take a look at the modified docs:
Cheers |
KlattG
left a comment
There was a problem hiding this comment.
One minor suggestion, otherwise fine
|
Not quite sure whether we need to keep the |
Yes, |
| // For Specification Version 5.0+, non-framework libraries must provide a manifest.json | ||
| if (this.getSpecVersion().gte("5.0") && !this.isFrameworkProject()) { | ||
| try { | ||
| await this._getManifest(); |
There was a problem hiding this comment.
Here the check is done before the if (buildManifest) { check and early return, but for Application.js / Component.js the check / error handling is done after (via _getNamespace). I'm not sure whether it makes a difference, but if it does, I assume we should align both places, right?
|
|
||
| Projects using older **Specification Versions** are expected to be **fully compatible with UI5 CLI v5**. | ||
|
|
||
| ## generateLibraryManifest Task No Longer Executed |
There was a problem hiding this comment.
This section should be reviewed again by UA, but my thoughts would be:
Does the title still explain the changes well enough? It is not wrong, but something that describes the new expectations with specVersion 5, i.e. "manifest.json is mandatory" might be easer to understand for consumers, who might not even have heard of the task name before.
| 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**. **SAPUI5 distribution libraries (framework projects) are not affected**. | ||
| ::: | ||
|
|
||
| With **Specification Version 5.0**, the [`generateLibraryManifest`](../api/module-@ui5_builder_tasks_generateLibraryManifest) build task is no longer executed for non-framework library projects. Libraries must provide a `manifest.json` directly in their source directory. |
There was a problem hiding this comment.
If you take directly in their source directory literally, then it would be at src/manifest.json, right? This would be wrong if the library uses folders for the namespace (like src/sap/ui/core/). I think we should make sure the expectations are described in a way that they cannot be misunderstood.
Saying that it needs to be placed next to library.js would be a good way of explaining what to do, without having to explain the two different ways of structuring the sources.
|
|
||
| **Action required** when upgrading a library project to Specification Version 5.0: | ||
|
|
||
| - Ensure your library has a `manifest.json` in its source directory. A previously auto-generated one is fully compatible and can be reused as-is. |
There was a problem hiding this comment.
I would rather have described this more literally, by telling to run a build before changing the specVersion and copy over the manifest.json file (located next to the library.js file) from the build result into the sources.
JIRA: CPOUI5FOUNDATION-1156
This change disables the
generateLibraryManifesttask and enforces a manifest presence for non-framework libraries