SAP / ui5-tooling

An open and modular toolchain to develop state of the art applications based on the UI5 framework
https://sap.github.io/ui5-tooling
Apache License 2.0
466 stars 69 forks source link

(self-contained build) Only rebuild dependencies if necessary #370

Open miffels opened 5 years ago

miffels commented 5 years ago

Expected Behavior

When running ui5 build self-contained --all, UI5 dependencies should only be rebuilt if necessary (i.e. resources folder is missing, declared version changed, dependencies of the project changed).

Current Behavior

The full set of libraries gets rebuilt, leading to very long build times (esp. on CI servers where it's not as easy to switch between build commands).

Steps to reproduce the issue

  1. Run ui5 build self-contained --all
  2. Run ui5 build self-contained --all again
  3. Everything gets rebuilt

Context

Affected components (if known)

Log Output / Stack Trace

n/a

codeworrior commented 5 years ago

I totally agree with you that unnecessary re-builds should be avoided, especially to speed up the dev-cycle.

But I don't get the point about the CI. Isn't a clean CI build standard? Or would you like the repository artifacts (NPM) to bring their build results with them? That's indeed something that we discussed back-and-forth...

miffels commented 5 years ago

There are techniques to carry over cached files between builds (e.g. Bitbucket Pipeline caches), and I believe UI5 libs would be a great candidate for a technical cache. The issue here is that libraries now impact app build times - i.e. a hello world sample takes 2 minutes on my machine whereas without the --all flag it's a few seconds.

Edit: That is to say, yes, a clean app build would be standard, but why also do a clean dependency rebuild if they rarely ever change?

nlunets commented 5 years ago

Just wondering out loud here, but why don't you publish the compiled version as part of the npm package and by default serve those ?