ui5-tooling
ui5-tooling copied to clipboard
(self-contained build) Only rebuild dependencies if necessary
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
- Run
ui5 build self-contained --all
- Run
ui5 build self-contained --all
again - Everything gets rebuilt
Context
- UI5 Module Version (output of
ui5 --version
when using the CLI):0.2.6
- Node.js Version:
10.13.0
- npm Version:
6.4.1
- OS/Platform: Windows 10 1803
- Browser (if relevant):
- Other information:
Affected components (if known)
- [X] ui5-builder
- [ ] ui5-server
- [X] ui5-cli
- [ ] ui5-fs
- [ ] ui5-project
- [ ] ui5-logger
Log Output / Stack Trace
n/a
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...
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?
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 ?