@@ -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
@@ -803,15 +803,15 @@ public async ValueTask GetStaticAssetUpdatesAsync(
803803 }
804804
805805 /// <summary>
806- /// Terminates all processes launched for non-root projects with <paramref name="projectPaths"/>,
807- /// or all running non-root project processes if <paramref name="projectPaths"/> is null.
806+ /// Terminates all processes launched for peripheral projects with <paramref name="projectPaths"/>,
807+ /// or all running peripheral project processes if <paramref name="projectPaths"/> is null.
808808 ///
809809 /// Removes corresponding entries from <see cref="_runningProjects"/>.
810810 ///
811- /// Does not terminate the root project.
811+ /// Does not terminate the main project.
812812 /// </summary>
813- /// <returns>All processes (including root ) to be restarted.</returns>
814- internal async ValueTask < ImmutableArray < RunningProject > > TerminateNonRootProcessesAsync (
813+ /// <returns>All processes (including main ) to be restarted.</returns>
814+ internal async ValueTask < ImmutableArray < RunningProject > > TerminatePeripheralProcessesAsync (
815815 IEnumerable < string > ? projectPaths , CancellationToken cancellationToken )
816816 {
817817 ImmutableArray < RunningProject > projectsToRestart = [ ] ;
@@ -826,7 +826,7 @@ internal async ValueTask<ImmutableArray<RunningProject>> TerminateNonRootProcess
826826 // Do not terminate root process at this time - it would signal the cancellation token we are currently using.
827827 // The process will be restarted later on.
828828 // Wait for all processes to exit to release their resources, so we can rebuild.
829- await Task . WhenAll ( projectsToRestart . Where ( p => ! p . Options . IsRootProject ) . Select ( p => p . TerminateForRestartAsync ( ) ) ) . WaitAsync ( cancellationToken ) ;
829+ await Task . WhenAll ( projectsToRestart . Where ( p => ! p . Options . IsMainProject ) . Select ( p => p . TerminateForRestartAsync ( ) ) ) . WaitAsync ( cancellationToken ) ;
830830
831831 return projectsToRestart ;
832832 }
@@ -885,14 +885,14 @@ private static ImmutableDictionary<string, ImmutableArray<ProjectInstance>> Crea
885885 keySelector : static group => group . Key ,
886886 elementSelector : static group => group . Select ( static node => node . ProjectInstance ) . ToImmutableArray ( ) ) ;
887887
888- public async Task UpdateProjectConeAsync ( ProjectGraph projectGraph , ProjectRepresentation project , CancellationToken cancellationToken )
888+ public async Task UpdateProjectGraphAsync ( ProjectGraph projectGraph , CancellationToken cancellationToken )
889889 {
890890 Logger . LogInformation ( "Loading projects ..." ) ;
891891 var stopwatch = Stopwatch . StartNew ( ) ;
892892
893893 _projectInstances = CreateProjectInstanceMap ( projectGraph ) ;
894894
895- var solution = await Workspace . UpdateProjectConeAsync ( project . ProjectGraphPath , cancellationToken ) ;
895+ var solution = await Workspace . UpdateProjectGraphAsync ( [ .. projectGraph . EntryPointNodes . Select ( n => n . ProjectInstance . FullPath ) ] , cancellationToken ) ;
896896 await SolutionUpdatedAsync ( solution , "project update" , cancellationToken ) ;
897897
898898 Logger . LogInformation ( "Projects loaded in {Time}s." , stopwatch . Elapsed . TotalSeconds . ToString ( "0.0" ) ) ;
0 commit comments