UI5 CLI 4.0 specification is incompatible with web workers
維護者通常 2 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- javascript, node.js
- 領域
- build-system, cli
研究方向
Start by reproducing the failure with a UI5 library containing MyWorker.js and ui5 build, using the reported specVersion 4.0.6 environment. Read the Builder documentation on JavaScript files requiring top-level scope and compare the error with the expected behavior. Done means a web worker script builds successfully under specification 4.0 without loading the UI5 framework in the worker.
由索引模型根據 Issue 內容生成。
描述
For UI5 projects utilizing web workers, the new restriction on "JavaScript Files Requiring Top Level Scope" in specification 4.0 renders the projects incompatible with the UI5 CLI build.
The problem is that a web worker script cannot be wrapped in a sap.ui.require or sap.ui.define function call since it is neither possible nor desirable to load the UI5 framework within a worker. The worker's driver scripts, by definition, run code in the global context, which the new specification prohibits.
Expected Behavior
Build completes successfully as in the previous specification versions.
Current Behavior
Builds fail with error error lbt:bundle:Builder Module {...redacted...}/SomeWorker.js requires top level scope and can only be embedded as a string (requires 'eval'), which is not supported with specVersion 4.0 and higher. For more information, see the UI5 Tooling documentation https://sap.github.io/ui5-tooling/stable/pages/Builder/#javascript-files-requiring-top-level-scope
Steps to Reproduce the Issue
- Create a UI5 library
- Add a script "MyWorker.js" somewhere in the package tree
- Add text
console.log("hello worker!")as file contents - Run ui5 build
- Note build failure on the MyWorker.js file.
Context
- UI5 Module Version (output of
ui5 --versionwhen using the CLI):4.0.6 - Node.js Version:
20.11.0 - npm Version:
10.2.4 - OS/Platform:
MacOS - Browser (if relevant):
N/A - Other information regarding your environment (optional):
nothing
Log Output / Stack Trace
{...}
- 主要語言
- JavaScript
- 星號
- 510
- 分支
- 80
- 平均合併
- 2 天 22 小時
- 30 天內合併 PR
- 12
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
UI5/cli 的其他 Issue
-
Build cache: buildThemes cache is invalidated by irrelevant library.js / .library content changes未關閉module/ui5-builder module/ui5-fs module/ui5-project
難度 3/5 1-2 天 新手友好度 76/100
維護者通常 2 天內回覆
-
module/ui5-project
難度 4/5 3-5 天 新手友好度 64/100
維護者通常 2 天內回覆
-
[ROADMAP] UI5 CLI 6.0 / Specification Version 6.0可能重新可做 @flovogt 於 116 天前認領,目前沒有進行中的 PR。 未關閉roadmap
UI5/cli#1485 · 1 個 reaction · 已指派 1 人 ·
維護者通常 2 天內回覆
-
build excludes from application project are not applied to dependencies可能重新可做 @flovogt 於 90 天前認領,目前沒有進行中的 PR。 未關閉
UI5/cli#1446 · 3 則留言 · 已指派 1 人 ·
維護者通常 2 天內回覆
-
難度 5/5 一週以上 新手友好度 20/100
維護者通常 2 天內回覆
相似的 Issue
-
enhancement
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 2 天內回覆
-
good first issue
難度 2/5 1-3 小時 新手友好度 86/100
laaielichter/AgentHaven#294 ·
維護者通常 1 天內回覆
-
documentation P3 tests
難度 2/5 1-3 小時 新手友好度 90/100
cafebugado/backendeventos-public-api#128 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
opensearch-project/OpenSearch-Dashboards#13289 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 92/100
erkamyaman/rea-games#246 ·
維護者通常 1 天內回覆