Skip to content

Commit

Permalink
chore: move API compatiblity check to final build step (#2911)
Browse files Browse the repository at this point in the history
Motivation: taking it out of the per-package 'test' step has the
following benefits:

- the build+test cycle is quicker, because we avoid unnecessary
  downloads of old versions of the package from NPM.
- we avoid quadratic complexity of downloads, where packages deep
  in the dependency tree get downloaded over and over again.
- there is a clear moment and location where the check is done,
  which can be easily disabled.

There is still accidental quadratic complexity in the current
implementation which cannot be avoided without updating jsii-diff:
although all downloads are done only once, every package's JSII
assembly is still loaded individually, and all dependencies are
reloaded every time.

Loading assemblies is not as cheap as you'd think, leading many
packages to take multiple seconds to load (~4s per package) and
so the whole process still takes multiple minutes.
  • Loading branch information
rix0rrr committed Jun 19, 2019
1 parent 390baf1 commit 5b44a4d
Show file tree
Hide file tree
Showing 6 changed files with 460 additions and 15 deletions.
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,6 @@ echo "==========================================================================
echo "building..."
time lerna run $bail --stream build+test || fail

/bin/bash scripts/check-api-compatibility.sh

touch $BUILD_INDICATOR
Loading

0 comments on commit 5b44a4d

Please sign in to comment.