Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[rsc-compile] only metacp the jdk/scala synthetics one time per run #6614
The jdk was being reindexed by metacp once for each target. Indexing the jdk took several seconds, so doing it N times, where N is the number of targets added a lot of overhead.
This patch extracts metacping the jdk into it's own job that's created before creating jobs for each target. It removes generating indices of scala synthetics and the jdk from the rsc job and makes metacp conditional in it. It's now conditional because metacp and metai only need to be invoked if there are java dependencies.
The synthetic scala generation was extracted by detecting when the current jar contains the scala standard library and telling metacp to generate the synthetics in that case.
The jdk shows up in the compile execution graph as a metacp task, and both it and the scala synthetics are only generated once per run.
Because of how the jdk is generated, indexing it will happen for each run in which there are invalid targets.