Skip to content

Commit 0a2b02c

Browse files
Copilotthomhurst
andauthored
+semver:minor - Remove .NET 6.0 support from target frameworks (#1196)
* Initial plan * Remove .NET 6.0 support from target frameworks Co-authored-by: thomhurst <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: thomhurst <[email protected]>
1 parent d91bb90 commit 0a2b02c

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
33
<PropertyGroup>
4-
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net6.0;net8.0;net9.0</TargetFrameworks>
4+
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net8.0;net9.0</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<LangVersion>preview</LangVersion>

src/ModularPipelines/Engine/ModuleExecutor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ private Task<ModuleBase> StartModule(ModuleBase module, bool isStartedAsDependen
211211
}
212212
}
213213
});
214-
214+
215215
return task;
216216
}
217217

@@ -248,7 +248,7 @@ private async Task StartDependency(ModuleBase requestingModule, Type dependencyT
248248
requestingModule.Context.Logger.LogDebug("{RequestingModule} is waiting for {Module}", requestingModule.GetType().Name, dependencyType.Name);
249249

250250
var moduleTask = StartModule(module, true);
251-
251+
252252
try
253253
{
254254
await moduleTask;
@@ -259,7 +259,7 @@ private async Task StartDependency(ModuleBase requestingModule, Type dependencyT
259259
$"{dependencyType.Name} threw an exception when {requestingModule.GetType().Name} was waiting for it as a dependency",
260260
e));
261261
requestingModule.Context.Logger.LogError(e, "Ignoring Exception due to 'AlwaysRun' set");
262-
262+
263263
// Observe the task's exception to prevent unobserved task exceptions
264264
_ = moduleTask.Exception;
265265
}

src/ModularPipelines/Helpers/ProgressPrinter.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public async Task PrintProgress(OrganizedModules organizedModules, CancellationT
4444
_totalModuleCount = organizedModules.RunnableModules.Count;
4545

4646
await AnsiConsole.Progress()
47-
.Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn(),
47+
.Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn(),
4848
new ElapsedTimeColumn(), new RemainingTimeColumn(), new SpinnerColumn())
4949
.StartAsync(async progressContext =>
5050
{
@@ -161,7 +161,7 @@ public ValueTask Handle(ModuleSkippedNotification notification, CancellationToke
161161
lock (_progressLock)
162162
{
163163
var moduleName = notification.Module.GetType().Name;
164-
164+
165165
if (_progressTasks.TryGetValue(notification.Module, out var progressTask))
166166
{
167167
progressTask.Description = $"[yellow][[Skipped]] {moduleName}[/]";
@@ -204,7 +204,7 @@ public ValueTask Handle(SubModuleCreatedNotification notification, CancellationT
204204
return ValueTask.CompletedTask;
205205
}
206206

207-
var progressTask = _progressContext.AddTaskAfter($"- {notification.SubModule.Name}",
207+
var progressTask = _progressContext.AddTaskAfter($"- {notification.SubModule.Name}",
208208
new ProgressTaskSettings { AutoStart = true }, parentTask);
209209

210210
_subModuleProgressTasks[notification.SubModule] = progressTask;

src/ModularPipelines/Modules/Module.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,9 @@ private void SetResult(ModuleResult<T> result)
329329
if (Timeout != TimeSpan.Zero)
330330
{
331331
var timeoutExceptionTask = CreateTimeoutTask(backgroundCancellationTokenSource.Token);
332-
332+
333333
await Task.WhenAny(timeoutExceptionTask, executeAsyncTask);
334-
334+
335335
backgroundCancellationTokenSource.Cancel();
336336

337337
await Task.WhenAll(timeoutExceptionTask, executeAsyncTask);
@@ -340,9 +340,9 @@ private void SetResult(ModuleResult<T> result)
340340
{
341341
await executeAsyncTask;
342342
}
343-
343+
344344
ModuleCancellationTokenSource.Token.ThrowIfCancellationRequested();
345-
345+
346346
// If we reach here without exception, still return the main task result
347347
return await executeAsyncTask;
348348
}
@@ -358,7 +358,7 @@ private async Task CreateTimeoutTask(CancellationToken cancellationToken)
358358
// Task was cancelled, exit gracefully
359359
return;
360360
}
361-
361+
362362
if (Status == Status.Successful)
363363
{
364364
return;

src/ModularPipelines/Modules/ModuleBase.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected ModuleBase()
4040
internal bool IsStarted { get; protected private set; }
4141

4242
internal List<Type> DependentModules { get; } = [];
43-
43+
4444
private readonly object _startLock = new();
4545
private Task<ModuleBase>? _moduleExecutionTask;
4646

@@ -92,7 +92,7 @@ protected set
9292
internal abstract Task ExecutionTask { get; }
9393

9494
internal abstract Task StartInternal();
95-
95+
9696
internal Task<ModuleBase> GetOrStartExecutionTask(Func<Task> startFunc)
9797
{
9898
lock (_startLock)
@@ -101,9 +101,9 @@ internal Task<ModuleBase> GetOrStartExecutionTask(Func<Task> startFunc)
101101
{
102102
return _moduleExecutionTask;
103103
}
104-
104+
105105
IsStarted = true;
106-
106+
107107
// Create and start the execution task
108108
// We must propagate exceptions that occur before the module starts
109109
// but handle exceptions that occur during module execution
@@ -131,7 +131,7 @@ internal Task<ModuleBase> GetOrStartExecutionTask(Func<Task> startFunc)
131131
}
132132
return this;
133133
});
134-
134+
135135
return _moduleExecutionTask;
136136
}
137137
}
@@ -185,7 +185,7 @@ protected async Task<T> SubModule<T>(string name, Func<Task<T>> action)
185185
SubModule<T>? submodule = null;
186186
IMediator? mediator = null;
187187
Task<T>? existingTask = null;
188-
188+
189189
lock (SubModuleBasesLock)
190190
{
191191
var existingSubModule = SubModuleBases.Find(x => x.Name == name);

0 commit comments

Comments
 (0)