Skip to content
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

SpreadsheetWorker.js not served from sap-ui-custom.js #538

Closed
faow opened this issue Jul 20, 2021 · 1 comment
Closed

SpreadsheetWorker.js not served from sap-ui-custom.js #538

faow opened this issue Jul 20, 2021 · 1 comment
Labels
help provided Consulting given or question answered invalid This doesn't seem right

Comments

@faow
Copy link

faow commented Jul 20, 2021

Expected Behavior

Self-contained builds are standalone and dont rely on files served from CDN or SAP-System-Version.
SpreadsheetWorker.js is served from sap-ui-custom.js for self-contained builds.

Current Behavior

SpreadsheetWorker.js is served from ..resources/sap... which is the SAP-System-Version of the file and also requires some additional files from the same location. This leads to errors, because the System-Version is not up-to-date.
image

Is there any way to include these files in the bundle?
I tried it with a custom bundle and a self-contained build with a standard application.

Steps to Reproduce the Issue

SampleApp: https://github.com/DSC-GMBH/sap.ui.comp.sample.smarttable

  1. Use npm run buildbasic to build a self-contained build
  2. Use npm run startdist to serve the dist files
  3. Watch the console on clicking the download button

Alternative way:

  1. Use npm run build to build a custom bundle build
  2. Use npm run startdist to serve the dist files
  3. Watch the console on clicking the download button
    There is also additional Information available:
    image

Context

  • UI5 Module Version (output of ui5 --version when using the CLI): 2.11.3
  • Node.js Version: 14.17.0
  • npm Version: 7.9.0
  • OS/Platform: Windows
  • Browser (if relevant): not relevant
  • Other information regarding your environment (optional): nothing

Log Output / Stack Trace

WARN lbt:bundle:Builder **** warning: module sap/ui/export/js/SpreadsheetWorker.js requires top level scope and can only be embedded as a string (requires 'eval')
verb lbt:bundle:Builder     sap/ui/export/js/SpreadsheetWorker.js (1670,1070)
@faow faow added bug Something isn't working needs triage Needs to be investigated and confirmed as a valid issue that is not a duplicate labels Jul 20, 2021
@matz3
Copy link
Member

matz3 commented Jul 21, 2021

The sap/ui/export/js/SpreadsheetWorker.js seems to be loaded within a Web Worker while the sap-ui-custom.js bundle is loaded in the main thread.
Furthermore the bundles created by the UI5 Tooling and the ui5loader in general are currently only supported within the main thread, not within a Web Worker or Service Worker. Sharing code between them would anyways be not straightforward.

To prevent issues with version differences I'd like to suggest that you use the --all flag to also build the dependencies (like sap.ui.export) in order to make those files available within the dist folder.

As the whole worker topic is currently not on our roadmap, I'm closing this issue.

@matz3 matz3 closed this as completed Jul 21, 2021
@matz3 matz3 added help provided Consulting given or question answered invalid This doesn't seem right and removed bug Something isn't working needs triage Needs to be investigated and confirmed as a valid issue that is not a duplicate labels Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help provided Consulting given or question answered invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants