@@ -27,7 +27,7 @@ internal sealed class CompilationHandler : IDisposable
2727 private readonly object _runningProjectsAndUpdatesGuard = new ( ) ;
2828
2929 /// <summary>
30- /// Projects that have been launched and to which we apply changes.
30+ /// Projects that have been launched and to which we apply changes.
3131 /// </summary>
3232 private ImmutableDictionary < string , ImmutableArray < RunningProject > > _runningProjects = ImmutableDictionary < string , ImmutableArray < RunningProject > > . Empty ;
3333
@@ -61,10 +61,10 @@ public void Dispose()
6161 private ILogger Logger
6262 => _context . Logger ;
6363
64- public async ValueTask TerminateNonRootProcessesAndDispose ( CancellationToken cancellationToken )
64+ public async ValueTask TerminatePeripheralProcessesAndDispose ( CancellationToken cancellationToken )
6565 {
6666 Logger . LogDebug ( "Terminating remaining child processes." ) ;
67- await TerminateNonRootProcessesAsync ( projectPaths : null , cancellationToken ) ;
67+ await TerminatePeripheralProcessesAsync ( projectPaths : null , cancellationToken ) ;
6868 Dispose ( ) ;
6969 }
7070
@@ -373,7 +373,7 @@ public async ValueTask GetManagedCodeUpdatesAsync(
373373 // except for the root process, which will terminate later on.
374374 if ( ! updates . ProjectsToRestart . IsEmpty )
375375 {
376- builder . ProjectsToRestart . AddRange ( await TerminateNonRootProcessesAsync ( updates . ProjectsToRestart . Select ( e => currentSolution . GetProject ( e . Key ) ! . FilePath ! ) , cancellationToken ) ) ;
376+ builder . ProjectsToRestart . AddRange ( await TerminatePeripheralProcessesAsync ( updates . ProjectsToRestart . Select ( e => currentSolution . GetProject ( e . Key ) ! . FilePath ! ) , cancellationToken ) ) ;
377377 }
378378 }
379379
@@ -802,15 +802,15 @@ public async ValueTask GetStaticAssetUpdatesAsync(
802802 }
803803
804804 /// <summary>
805- /// Terminates all processes launched for non-root projects with <paramref name="projectPaths"/>,
806- /// or all running non-root project processes if <paramref name="projectPaths"/> is null.
805+ /// Terminates all processes launched for peripheral projects with <paramref name="projectPaths"/>,
806+ /// or all running peripheral project processes if <paramref name="projectPaths"/> is null.
807807 ///
808808 /// Removes corresponding entries from <see cref="_runningProjects"/>.
809809 ///
810- /// Does not terminate the root project.
810+ /// Does not terminate the main project.
811811 /// </summary>
812- /// <returns>All processes (including root ) to be restarted.</returns>
813- internal async ValueTask < ImmutableArray < RunningProject > > TerminateNonRootProcessesAsync (
812+ /// <returns>All processes (including main ) to be restarted.</returns>
813+ internal async ValueTask < ImmutableArray < RunningProject > > TerminatePeripheralProcessesAsync (
814814 IEnumerable < string > ? projectPaths , CancellationToken cancellationToken )
815815 {
816816 ImmutableArray < RunningProject > projectsToRestart = [ ] ;
@@ -825,7 +825,7 @@ internal async ValueTask<ImmutableArray<RunningProject>> TerminateNonRootProcess
825825 // Do not terminate root process at this time - it would signal the cancellation token we are currently using.
826826 // The process will be restarted later on.
827827 // Wait for all processes to exit to release their resources, so we can rebuild.
828- await Task . WhenAll ( projectsToRestart . Where ( p => ! p . Options . IsRootProject ) . Select ( p => p . TerminateForRestartAsync ( ) ) ) . WaitAsync ( cancellationToken ) ;
828+ await Task . WhenAll ( projectsToRestart . Where ( p => ! p . Options . IsMainProject ) . Select ( p => p . TerminateForRestartAsync ( ) ) ) . WaitAsync ( cancellationToken ) ;
829829
830830 return projectsToRestart ;
831831 }
@@ -884,14 +884,14 @@ private static ImmutableDictionary<string, ImmutableArray<ProjectInstance>> Crea
884884 keySelector : static group => group . Key ,
885885 elementSelector : static group => group . Select ( static node => node . ProjectInstance ) . ToImmutableArray ( ) ) ;
886886
887- public async Task UpdateProjectConeAsync ( ProjectGraph projectGraph , ProjectRepresentation project , CancellationToken cancellationToken )
887+ public async Task UpdateProjectGraphAsync ( ProjectGraph projectGraph , CancellationToken cancellationToken )
888888 {
889889 Logger . LogInformation ( "Loading projects ..." ) ;
890890 var stopwatch = Stopwatch . StartNew ( ) ;
891891
892892 _projectInstances = CreateProjectInstanceMap ( projectGraph ) ;
893893
894- var solution = await Workspace . UpdateProjectConeAsync ( project . ProjectGraphPath , cancellationToken ) ;
894+ var solution = await Workspace . UpdateProjectGraphAsync ( [ .. projectGraph . EntryPointNodes . Select ( n => n . ProjectInstance . FullPath ) ] , cancellationToken ) ;
895895 await SolutionUpdatedAsync ( solution , "project update" , cancellationToken ) ;
896896
897897 Logger . LogInformation ( "Projects loaded in {Time}s." , stopwatch . Elapsed . TotalSeconds . ToString ( "0.0" ) ) ;
0 commit comments