File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed
Synthesis.Bethesda.Execution Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ public async Task<ErrorResponse> Check(
7474 FilePath ? buildMetaPath ,
7575 CancellationToken cancel )
7676 {
77+ cancel . ThrowIfCancellationRequested ( ) ;
78+
7779 var meta = buildMetaPath != null ? MetaFileReader . Read ( buildMetaPath . Value ) : default ;
7880
7981 if ( _shortCircuitSettingsProvider . Shortcircuit && meta is { DoesNotHaveRunnability : true } ) return ErrorResponse . Success ;
@@ -100,6 +102,8 @@ void AddResult(string s)
100102 ModKey = modKey . ToString ( )
101103 } ;
102104
105+ cancel . ThrowIfCancellationRequested ( ) ;
106+
103107 var result = ( Codes ) await Dropoff . EnqueueAndWait ( ( ) =>
104108 {
105109 return ProcessRunner . RunWithCallback (
@@ -113,7 +117,9 @@ void AddResult(string s)
113117 return ErrorResponse . Fail ( string . Join ( Environment . NewLine , results ) ) ;
114118 }
115119
116- if ( result == Codes . NotNeeded
120+ cancel . ThrowIfCancellationRequested ( ) ;
121+
122+ if ( result == Codes . NotNeeded
117123 && meta != null
118124 && buildMetaPath != null )
119125 {
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ public async Task<SettingsConfiguration> Get(
6868 FilePath ? buildMetaPath ,
6969 CancellationToken cancel )
7070 {
71+ cancel . ThrowIfCancellationRequested ( ) ;
72+
7173 var meta = buildMetaPath != null ? _metaFileReader . Read ( buildMetaPath . Value ) : default ;
7274
7375 if ( _shortCircuitSettingsProvider . Shortcircuit && meta ? . SettingsConfiguration != null )
@@ -78,6 +80,8 @@ public async Task<SettingsConfiguration> Get(
7880
7981 var settingsConfig = await ExecuteSettingsRetrievalFromExecutable ( executablePath , cancel ) ;
8082
83+ cancel . ThrowIfCancellationRequested ( ) ;
84+
8185 if ( meta != null
8286 && buildMetaPath != null )
8387 {
Original file line number Diff line number Diff line change @@ -54,6 +54,8 @@ public async Task<GetResponse<GitCompilationMeta>> Compile(
5454 DotNetVersion dotNetVersion ,
5555 CancellationToken cancel )
5656 {
57+ cancel . ThrowIfCancellationRequested ( ) ;
58+
5759 try
5860 {
5961var meta = _metaFileReader . Read ( info . MetaPath ) ;
@@ -77,6 +79,8 @@ public async Task<GetResponse<GitCompilationMeta>> Compile(
7779 _logger . Warning ( e , "Failed when checking if we could short circuit compilation" ) ;
7880 }
7981
82+ cancel . ThrowIfCancellationRequested ( ) ;
83+
8084 try
8185 {
8286 _logger . Information ( "Clearing short circuit meta" ) ;
@@ -88,9 +92,13 @@ public async Task<GetResponse<GitCompilationMeta>> Compile(
8892 _logger . Error ( e , "Failed when clearing short circuit meta" ) ;
8993 }
9094
95+ cancel . ThrowIfCancellationRequested ( ) ;
96+
9197 var resp = await _build . Compile ( info . Project . ProjPath , cancel ) . ConfigureAwait ( false ) ;
9298 if ( resp . Failed ) return GetResponse < GitCompilationMeta > . Fail ( default ! , new SynthesisBuildFailure ( resp . Reason ) ) ;
9399
100+ cancel . ThrowIfCancellationRequested ( ) ;
101+
94102 GitCompilationMeta compilationMeta ;
95103 try
96104 {
You can’t perform that action at this time.
0 commit comments