Skip to content

Commit

Permalink
feat(pacmak): build all java targets at once (#849)
Browse files Browse the repository at this point in the history
Improve build speed by building all jsii targets at the same time,
and using a special aggregate POM build for Java.

- Improves speed by not unnecessarily re-reading jsii assemblies
  for each individual build.
- Improves speed by using an aggregate POM to build all Java
  targets (can reuse JVM instances and compilation metadata by Maven).
- Improves wall-clock time by building all languages in parallel.

On my machine, reduces the time to pack the entire CDK repository
from 25min user/15min wall clock to 15min user/5 min wall clock.
  • Loading branch information
rix0rrr authored and RomainMuller committed Oct 17, 2019
1 parent 0cc1a4c commit 5d7824d
Show file tree
Hide file tree
Showing 28 changed files with 658 additions and 9,696 deletions.
3 changes: 1 addition & 2 deletions packages/jsii-calc-base-of-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@
"python": {
"distName": "scope.jsii-calc-base-of-base",
"module": "scope.jsii_calc_base_of_base"
},
"sphinx": {}
}
},
"versionFormat": "short"
}
Expand Down
5 changes: 2 additions & 3 deletions packages/jsii-calc-base-of-base/test/assembly.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
"python": {
"distName": "scope.jsii-calc-base-of-base",
"module": "scope.jsii_calc_base_of_base"
},
"sphinx": {}
}
},
"types": {
"@scope/jsii-calc-base-of-base.IVeryBaseInterface": {
Expand Down Expand Up @@ -112,5 +111,5 @@
}
},
"version": "0.19.0",
"fingerprint": "7MB5loMgQMPSUAigsYezONp1ouq1gGrVQPD2TZteJlY="
"fingerprint": "Vlx00ifa2hokcWUTvyArHMvCacQmjgyYtwy0zEWGZo0="
}
3 changes: 1 addition & 2 deletions packages/jsii-calc-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@
"python": {
"distName": "scope.jsii-calc-base",
"module": "scope.jsii_calc_base"
},
"sphinx": {}
}
},
"versionFormat": "short"
}
Expand Down
11 changes: 4 additions & 7 deletions packages/jsii-calc-base/test/assembly.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
"python": {
"distName": "scope.jsii-calc-base-of-base",
"module": "scope.jsii_calc_base_of_base"
},
"sphinx": {}
}
},
"version": "0.19.0"
}
Expand All @@ -53,8 +52,7 @@
"python": {
"distName": "scope.jsii-calc-base-of-base",
"module": "scope.jsii_calc_base_of_base"
},
"sphinx": {}
}
},
"version": "0.19.0"
}
Expand Down Expand Up @@ -88,8 +86,7 @@
"python": {
"distName": "scope.jsii-calc-base",
"module": "scope.jsii_calc_base"
},
"sphinx": {}
}
},
"types": {
"@scope/jsii-calc-base.Base": {
Expand Down Expand Up @@ -177,5 +174,5 @@
}
},
"version": "0.19.0",
"fingerprint": "UzDw4nRR+4fhd01t0ybeUo6SmdnWdfKbE+pTzl/6voQ="
"fingerprint": "N9LvPVtN5Azr2Ip3FMatwqceL+70AEYPqZk+T7qC/bc="
}
3 changes: 1 addition & 2 deletions packages/jsii-calc-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
"python": {
"distName": "scope.jsii-calc-lib",
"module": "scope.jsii_calc_lib"
},
"sphinx": {}
}
},
"versionFormat": "short"
}
Expand Down
14 changes: 5 additions & 9 deletions packages/jsii-calc-lib/test/assembly.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
"python": {
"distName": "scope.jsii-calc-base",
"module": "scope.jsii_calc_base"
},
"sphinx": {}
}
},
"version": "0.19.0"
}
Expand All @@ -53,8 +52,7 @@
"python": {
"distName": "scope.jsii-calc-base",
"module": "scope.jsii_calc_base"
},
"sphinx": {}
}
},
"version": "0.19.0"
},
Expand All @@ -77,8 +75,7 @@
"python": {
"distName": "scope.jsii-calc-base-of-base",
"module": "scope.jsii_calc_base_of_base"
},
"sphinx": {}
}
},
"version": "0.19.0"
}
Expand Down Expand Up @@ -118,8 +115,7 @@
"python": {
"distName": "scope.jsii-calc-lib",
"module": "scope.jsii_calc_lib"
},
"sphinx": {}
}
},
"types": {
"@scope/jsii-calc-lib.EnumFromScopedModule": {
Expand Down Expand Up @@ -543,5 +539,5 @@
}
},
"version": "0.19.0",
"fingerprint": "fTZVmFlDa7uoeJF41GTcIhD33vnnyxZOgxCeZ1hIvSk="
"fingerprint": "rS2rGvy6Ma6wo/1JfCpR21CQsx8P5YmdtrxJ5EjgXxs="
}
3 changes: 1 addition & 2 deletions packages/jsii-calc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@
"python": {
"distName": "jsii-calc",
"module": "jsii_calc"
},
"sphinx": {}
}
},
"metadata": {
"jsii:boolean": true,
Expand Down
23 changes: 8 additions & 15 deletions packages/jsii-calc/test/assembly.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@
"python": {
"distName": "scope.jsii-calc-base",
"module": "scope.jsii_calc_base"
},
"sphinx": {}
}
},
"version": "0.19.0"
},
Expand All @@ -77,8 +76,7 @@
"python": {
"distName": "scope.jsii-calc-base-of-base",
"module": "scope.jsii_calc_base_of_base"
},
"sphinx": {}
}
},
"version": "0.19.0"
},
Expand All @@ -103,8 +101,7 @@
"python": {
"distName": "scope.jsii-calc-lib",
"module": "scope.jsii_calc_lib"
},
"sphinx": {}
}
},
"version": "0.19.0"
}
Expand All @@ -129,8 +126,7 @@
"python": {
"distName": "scope.jsii-calc-base",
"module": "scope.jsii_calc_base"
},
"sphinx": {}
}
},
"version": "0.19.0"
},
Expand All @@ -153,8 +149,7 @@
"python": {
"distName": "scope.jsii-calc-base-of-base",
"module": "scope.jsii_calc_base_of_base"
},
"sphinx": {}
}
},
"version": "0.19.0"
},
Expand All @@ -179,8 +174,7 @@
"python": {
"distName": "scope.jsii-calc-lib",
"module": "scope.jsii_calc_lib"
},
"sphinx": {}
}
},
"version": "0.19.0"
}
Expand Down Expand Up @@ -228,8 +222,7 @@
"python": {
"distName": "jsii-calc",
"module": "jsii_calc"
},
"sphinx": {}
}
},
"types": {
"jsii-calc.AbstractClass": {
Expand Down Expand Up @@ -9617,5 +9610,5 @@
}
},
"version": "0.19.0",
"fingerprint": "z0M8ATIlYi8ohIQB7KR90oh4pKmIb3EdBoPgS3/lyHM="
"fingerprint": "nQMF6ipA96E38PvG3NsgKOJIb3ZEit4jNrxZAkgRlbs="
}
2 changes: 0 additions & 2 deletions packages/jsii-kernel/test/kernel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ defineTest('naming allows returns the module name for different languages', (san
},
js: { npm: 'jsii-calc' },
python: { distName: 'jsii-calc', module: 'jsii_calc' },
sphinx: {},
});
expect(sandbox.naming({ assembly: '@scope/jsii-calc-lib' }).naming).toEqual({
dotnet: {
Expand All @@ -227,7 +226,6 @@ defineTest('naming allows returns the module name for different languages', (san
},
js: { npm: '@scope/jsii-calc-lib' },
python: { distName: 'scope.jsii-calc-lib', module: 'scope.jsii_calc_lib' },
sphinx: {},
});
});

Expand Down
Loading

0 comments on commit 5d7824d

Please sign in to comment.