Metals (BSP client) expects a prompt response to build/initialize and if it doesn't get one within 30 seconds it assumes the build server has not started correctly and so attempts to restart it.
Large projects take longer than this because the sourceset population takes a long time.
This shifts the population of sourcesets away from build/initialize and into workspace/buildTargets
It also shifts the responsibility of handling workspace/reload away from LifecycleService and into BuildTargetService. The LifecycleService code was similar to that RefetchBuildTargetTask so this allows doing away with RefetchBuildTargetTask and also means that any call to workspace/reload will cause a buildTarget/didChange event if the workspace has changed - which wasn't the case before.
Metals (BSP client) expects a prompt response to
build/initialize
and if it doesn't get one within 30 seconds it assumes the build server has not started correctly and so attempts to restart it.Large projects take longer than this because the sourceset population takes a long time.
This shifts the population of sourcesets away from
build/initialize
and intoworkspace/buildTargets
It also shifts the responsibility of handling
workspace/reload
away fromLifecycleService
and intoBuildTargetService
. TheLifecycleService
code was similar to thatRefetchBuildTargetTask
so this allows doing away withRefetchBuildTargetTask
and also means that any call toworkspace/reload
will cause abuildTarget/didChange
event if the workspace has changed - which wasn't the case before.