build_runner/daemon should report assets that were updated during a build
When using codegen mode, flutter_tools runs the frontend_server as an additional layer on a build_runner process. This is required since the generation of incremental dill files is not currently supported in a way that is compatible with build.
To produce this incremental dill, we take the list of assets that have been invalidated since the last hot reload and feed it to the frontend_server. Currently this is done via a filesystem traversal and stat, which is slow unless we can exclude most project files. For example, I can exclude every file in .pub_cache, since it shouldn't really be changing. But I don't believe that is necessarily safe to do in the build_cache.
I'd like to avoid traversing the build cache, since there could be many intermediates, unrelated, or files from previous builds. Since build_runner presumably already knows the files that were invalidated, if it could report this via the build_daemon it would save the tool a lot of work.
We do already add this information to the BuildResult on the build_runner side of things, so it probably just needs to be added to the protocol for build_daemon.
cc @grouma
cc @liuming0
@jonahwilliams do you want just the assets that were built, or also files that were changed. Basically is this enough: https://github.com/dart-lang/build/blob/master/build_runner_core/lib/src/generate/build_result.dart#L21
assets that were built is all I need for now, if those could be exposed via the build_daemon'sBuildResult class that would be ideal.
Longer term, both built and invalidated assets would be useful in order to simplify however we decide to layer the frontend_server/kernel_worker onto build_runner - but that is more speculative so lets cross that bridge when we get to it?