-
-
Notifications
You must be signed in to change notification settings - Fork 4
fix: build examples in CI #347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| using ModularPipelines.Context; | ||
| using ModularPipelines.DotNet.Extensions; | ||
| using ModularPipelines.DotNet.Options; | ||
| using ModularPipelines.Git.Extensions; | ||
| using ModularPipelines.Models; | ||
| using ModularPipelines.Modules; | ||
|
|
||
| namespace EnumerableAsyncProcessor.Pipeline.Modules; | ||
|
|
||
| public class BuildExampleProjectsModule : Module<List<CommandResult>> | ||
| { | ||
| protected override async Task<List<CommandResult>?> ExecuteAsync( | ||
| IModuleContext context, | ||
| CancellationToken cancellationToken) | ||
| { | ||
| var results = new List<CommandResult>(); | ||
|
|
||
| foreach (var exampleProjectFile in context | ||
| .Git().RootDirectory | ||
| .GetFiles(file => file.Path.EndsWith(".csproj", StringComparison.OrdinalIgnoreCase) | ||
| && file.Path.Contains("Example", StringComparison.OrdinalIgnoreCase))) | ||
| { | ||
| results.Add(await context.DotNet().Build(new DotNetBuildOptions | ||
| { | ||
| ProjectSolution = exampleProjectFile.Path, | ||
| Configuration = "Release", | ||
| }, cancellationToken: cancellationToken)); | ||
|
Comment on lines
+22
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 563971e.
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
|
|
||
| return results; | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new eager
await foreachwaits for every result before this method returns, so processor tasks are no longer left running when it goes out of scope. The processor still is not disposed, but this example now demonstrates leaked disposal resources rather than unfinished work.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 563971e. The comment now states that undisposed processor resources remain uncleaned; it no longer claims eager-enumerated tasks are still running.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correction: #347 auto-merged before the pushed review-fix commit was attached. The corrected leak description is now in follow-up #349 (
e0059fc).