SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.94k stars 1.23k forks source link

sap/ui/core/library-preload.json has lots of different files between downloaded sdk and grunt-built sdk #1115

Closed cmastrandrea closed 6 years ago

cmastrandrea commented 8 years ago

OpenUI5 version: 1.38.5

Browser/version (+device/version): any

Any other tested browsers/devices(OK/FAIL):

URL (minimal example if possible): N/A

User/password (if required and possible - do not post any confidential information here):

Steps to reproduce the problem:

  1. Download OpenUI5 runtime from https://openui5.hana.ondemand.com/downloads/openui5-runtime-1.38.5.zip
  2. Use git to clone OpenUI5 from https://github.com/SAP/openui5.git and checkout 1.38.5
  3. From the directory you checked out OpenUI5, run "npm install" to download the required build tools.
  4. From the same directory, run "grunt build --production"
  5. From the same directory, run "grunt package."
  6. Compare the contents of the resources/sap/ui/core/library-preload.json files between the "runtime" zip file (from step 1) with the target/openui5.zip file built in step 5.

What is the expected result? I would expect the files included in the library-preload.json file to be the same or very similar between the one built by grunt and the one in the downloadable OpenUI5 zip.

What happens instead? There are 10 files in downloadable zip library-preload for sap.ui.core that weren't in the one that is built with grunt. There are approximately 100 files in the grunt library-preload for sap.ui.core that aren't in the downloadable zip version. Some of the files missing from the grunt version were recently added to the library-preload.json file according to the SDK changelogs.

Any other information? (attach screenshot if possible) I suspect that the sap.ui.core preload.src library definition in Gruntfile.js for the SDK (which defines the list of files to include in the library-preload.json file) is out of date. If desired, I can provide a complete list of differences in the file list.

akudev commented 8 years ago

Hi Chuck, we are aware and have communicated that there are differences between our old internal Maven-based build and the new publicly available grunt-based build. However, the hope would have been that those differences are getting less and less as we transition to the sole usage of the grunt build. As you describe it, the differences are not only significant, but even increasing and this would be an issue. I'll check the details internally and report back.

Regards Andreas

akudev commented 8 years ago

Re-reading the issue report, the issue seems less dramatic than I thought... just a matter of where the files are. Indeed the two build variants create different core js files and hence a different preload with the "rest", so it might just be a matter of updating the file lists...

matz3 commented 8 years ago

This issue is based of the fact that the grunt build does not dynamically bundle the required files for the sap-ui-core.js like it is done in the internal build. As you can see from the grunt concat configuration it is just a static list of the minimal required files to boot the core. All other files are part of the library-preload which gets automatically loaded before booting the core.

This is the reason the library-preload contains more files in the grunt variant. In the internal build it does not contain the files already part of sap-ui-core.js (which are actually all dependencies of the sap.ui.core.Core class).

I will keep this issue open as this is something we would like to address in future, although it is currently not clear when this is going to happen.

mkueng1 commented 7 years ago

I'm not sure if I sould open a seperate ticket as the version is different (1.40.7) but the root cause is probably the same as here. When using the new sap-ui-core.js an error is printed out:

[Deprecated] jQuery.sap.preloadModules was never a public API and will be removed soon. Migrate to Core.loadLibraries()!".

The loading mechanism seems quite different between the bower package version which contains window["sap-ui-debug"]||jQuery.sap.preloadModules("sap.ui.core.library-preload",!1) and the one available at openui5.hana.ondemand.com in which the line is completely missing.

matz3 commented 7 years ago

@mkueng1 this shouldn't be the case anymore with the latest patches. The OpenUI5 bower delivery now also includes library-preload.js files.

matz3 commented 6 years ago

When building the sap.ui.core library with the new UI5 Tooling, the files should be the same as in the SDK. There shouldn't be a difference in how UI5 is loaded anymore.