Right now compile, compiles everything, which allows propagation of errors.
However it is possible to have this and also a bit more performance.
When a build completes the entire set of diagnostics files are read from the filesystem.
If we could infer the set of transitive compile targets a target implies we can narrow down the diagnostics files to read.
We can rebuild only the selected targets in the foreground and read the selected targets' diagnostics files, then we can, in the background, rebuild everything and read the changed diagnostics files (1).
We can either use bazel query somepath or a Scala computation to construct the ancestors set for our targets.
If we can ask bazel about cache invalidation things, maybe we can cache diagnostics locations also?
buildTargets, scalacOptions sources and dependencySources are fairly rare, so a full filesystem read is okay I think.
Right now compile, compiles everything, which allows propagation of errors. However it is possible to have this and also a bit more performance.
When a build completes the entire set of diagnostics files are read from the filesystem.
We can either use
bazel query somepath
or a Scala computation to construct the ancestors set for our targets.If we can ask bazel about cache invalidation things, maybe we can cache diagnostics locations also?
buildTargets, scalacOptions sources and dependencySources are fairly rare, so a full filesystem read is okay I think.