Files imported by UniversalDate missing from self-contained build output

Open
#357 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript

Research direction

Start with the linked openui5 UniversalDate.js source at line 90 and inspect how ui5-builder creates sap-ui-custom.js from dynamically loaded modules. Reproduce the self-contained build using the listed UniversalDate calendar files, then verify that the Buddhist, Gregorian, Islamic, Japanese, and Persian modules are included without missing imports.

Written by the indexing model from the issue text.

Description

module/ui5-builder

Expected Behavior

There are no missing JavaScript files in sap-ui-custom.js used by an application.

Current Behavior

sap/ui/core/date/(Buddhist|Gregorian|Islamic|Japanese|Persian).js is not being included.

Steps to reproduce the issue

  1. Take a look at the sap/ui/core/date/UniversalDate.js source from the openui5 repo:
    https://github.com/SAP/openui5/blob/6478939c8d4a89b3197647d6bcb99e3cb54f3047/src/sap.ui.core/src/sap/ui/core/date/UniversalDate.js#L90

  2. There is a sap.ui.requireSync call on line 90 that loads a computed filepath:
    sap.ui.requireSync("sap/ui/core/date/" + sCalendarType)

  3. Due to the dynamic nature of this import, the build of sap-ui-custom.js won't include any of the possible files. I'm not sure if a fix would go into the build tools or into the SDK source code...

Context

  • UI5 Module Version (output of ui5 --version when using the CLI): 1.5.2 (from C:\dev\master\htmlcommons-samples\openui-microbump\node_modules\@ui5\cli\bin\ui5.js)
  • Node.js Version: v8.11.1
  • npm Version: 6.9.0
  • OS/Platform: Windows 10 1809
  • Browser (if relevant): N/A
  • Other information: N/A

Affected components (if known)

Log Output / Stack Trace

N/A
Dominant language
JavaScript
Stars
511
Forks
83
Avg merge
1d 5h
Merged PRs (30d)
55

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from UI5/cli

All issues in UI5/cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.