Conversation
Agent-Logs-Url: https://github.com/Tyrrrz/Onova/sessions/b5021e64-315e-4a5a-b072-5f046c29db21 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Tyrrrz/Onova/sessions/b5021e64-315e-4a5a-b072-5f046c29db21 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Tyrrrz/Onova/sessions/c06883e4-e131-414e-94c6-112e61b8882e Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adopts PowerKit across the solution to replace several home-grown utility helpers, while also updating PolyShim/CSharpier and applying a formatting pass.
Changes:
- Replace custom IO helpers (lock file, pooled buffers, stream/string/IO extensions) with PowerKit equivalents.
- Refactor package extraction/downloading code to use PowerKit’s
CopyToAsyncoverloads (including progress reporting). - Update central package versions (PolyShim, CSharpier.MsBuild) and add PowerKit to projects.
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Onova/Utils/PooledBuffer.cs | Deleted; previously wrapped ArrayPool for streaming buffers. |
| Onova/Utils/LockFile.cs | Deleted; replaced by PowerKit.LockFile. |
| Onova/Utils/Extensions/StringExtensions.cs | Deleted; base64 conversion inlined and other helpers assumed to come from PowerKit. |
| Onova/Utils/Extensions/StreamExtensions.cs | Deleted; stream copy w/ progress now delegated to PowerKit. |
| Onova/Utils/Extensions/ReflectionExtensions.cs | Deleted; manifest resource extraction now expected via PowerKit extensions. |
| Onova/Utils/Extensions/HttpClientExtensions.cs | Switches HTTP content copy to PowerKit stream copy w/ length/progress support. |
| Onova/Utils/Extensions/FileExtensions.cs | Deleted; write-access check now expected via PowerKit. |
| Onova/Utils/Extensions/DirectoryExtensions.cs | Deleted; directory reset/write-access now expected via PowerKit. |
| Onova/UpdateManager.cs | Uses PowerKit lock file + PowerKit IO extensions; inlines base64 arg routing. |
| Onova/Services/ZipPackageExtractor.cs | Uses PowerKit CopyToAsync and introduces per-entry progress adapter. |
| Onova/Services/WebPackageResolver.cs | Uses PowerKit string extensions and keeps download flow via existing HttpClient extensions. |
| Onova/Services/NugetPackageExtractor.cs | Uses PowerKit CopyToAsync and introduces per-entry progress adapter. |
| Onova/Services/LocalPackageResolver.cs | Uses PowerKit stream copy overload for file-to-file downloads with progress. |
| Onova/Services/GithubPackageResolver.cs | Formatting-only tweak to release name parsing. |
| Onova/Onova.csproj | Adds PowerKit package reference. |
| Onova.Updater/Utils/FileEx.cs | Deleted; file write-access check moved to PowerKit. |
| Onova.Updater/Utils/Disposable.cs | Deleted; no longer needed after refactors. |
| Onova.Updater/Updater.cs | Switches to PowerKit File.CheckWriteAccess. |
| Onova.Updater/Onova.Updater.csproj | Adds PowerKit package reference. |
| Onova.Tests/Utils/Extensions/ZipExtensions.cs | Deleted; Zip entry helpers moved to PowerKit extensions. |
| Onova.Tests/Utils/Extensions/DirectoryExtensions.cs | Deleted; directory helpers moved to PowerKit extensions. |
| Onova.Tests/Utils/DummyEnvironment.cs | Adjusts cleanup deletion to preserve exception semantics via direct Directory.Delete. |
| Onova.Tests/UpdateSpecs.cs | Replaces directory helpers with PowerKit + direct delete retry loop; uses Directory.TryDelete for storage cleanup. |
| Onova.Tests/Resolving/WebSourceSpecs.cs | Uses PowerKit directory helpers (Reset, TryDelete). |
| Onova.Tests/Resolving/NugetSourceSpecs.cs | Uses PowerKit directory helpers (Reset, TryDelete). |
| Onova.Tests/Resolving/LocalSourceSpecs.cs | Uses PowerKit directory helpers (Reset, TryDelete). |
| Onova.Tests/Resolving/GithubSourceSpecs.cs | Uses PowerKit directory helpers (Reset, TryDelete). |
| Onova.Tests/Resolving/AggregateSourceSpecs.cs | Uses PowerKit directory helpers (Reset, TryDelete). |
| Onova.Tests/Onova.Tests.csproj | Adds PowerKit package reference. |
| Onova.Tests/Extracting/ZipPackageSpecs.cs | Uses PowerKit directory helpers and zip entry write helper. |
| Onova.Tests/Extracting/NugetPackageSpecs.cs | Uses PowerKit directory helpers and zip entry write helper. |
| Directory.Packages.props | Bumps PolyShim/CSharpier and adds central PowerKit version. |
| Directory.Build.props | Removes stray blank lines (formatting cleanup). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Agent-Logs-Url: https://github.com/Tyrrrz/Onova/sessions/731e7341-14cb-48e9-9dea-b02059b731c9 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
…ns in Updater Agent-Logs-Url: https://github.com/Tyrrrz/Onova/sessions/74a829b7-8bfd-4871-9fa8-3f95bfe63dec Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Done in 2486c00. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## prime #89 +/- ##
==========================================
- Coverage 72.15% 70.56% -1.59%
==========================================
Files 28 21 -7
Lines 553 479 -74
Branches 75 65 -10
==========================================
- Hits 399 338 -61
+ Misses 129 119 -10
+ Partials 25 22 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@copilot instead of DisposeAll() you can use Disposable.Merge(...).Dispose() |
…DisposableExtensions Agent-Logs-Url: https://github.com/Tyrrrz/Onova/sessions/11aa7b32-e8f3-4045-8a68-f468641d870d Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 37 out of 37 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… and NugetPackageExtractor Agent-Logs-Url: https://github.com/Tyrrrz/Onova/sessions/c0509de2-2ce7-4075-949e-90091114d28c Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
…stead Agent-Logs-Url: https://github.com/Tyrrrz/Onova/sessions/c51b5d35-c4eb-4bef-8673-5bab54bf799c Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
|
@copilot update PowerKit and PolyShim, and you should get Directory.Copy. Run dotnet build to reformat everything afterward. |
…toryEx.cs, reformat Agent-Logs-Url: https://github.com/Tyrrrz/Onova/sessions/23efc8d5-0e30-460b-9892-32cfc1ab06a8 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Done in a886664. Updated PowerKit |
Adopts PowerKit 0.0.0-a.5 across
Onova,Onova.Updater, andOnova.Tests, replacing hand-rolled utility classes with PowerKit equivalents. Also bumps PolyShim 2.7.0 → 2.10.0 and CSharpier.MsBuild 1.2.1 → 1.2.6 with a re-format pass.Replaced utilities
Onova— deleted in favour of PowerKit:Utils/LockFile.cs→PowerKit.LockFileUtils/PooledBuffer.cs→ PowerKit's internalMemoryPool<byte>usageUtils/Extensions/DirectoryExtensions.cs→PowerKit.Extensions.DirectoryExtensions(Reset,CheckWriteAccess)Utils/Extensions/FileExtensions.cs→PowerKit.Extensions.FileExtensions(CheckWriteAccess)Utils/Extensions/ReflectionExtensions.cs→PowerKit.Extensions.AssemblyExtensions(ExtractManifestResourceAsync)Utils/Extensions/StreamExtensions.cs→PowerKit.Extensions.StreamExtensions(CopyToAsyncwith progress)Utils/Extensions/StringExtensions.cs→ inlinedConvert.ToBase64String(Encoding.UTF8.GetBytes(...))Onova.Updater— deleted:Utils/Disposable.cs→PowerKit.DisposableUtils/FileEx.cs→PowerKit.Extensions.FileExtensions.CheckWriteAccessUtils/Extensions/BinaryExtensions.cs→ inlinedEncoding.UTF8.GetString(Convert.FromBase64String(...))directly inProgram.csUtils/Extensions/DirectoryEx.cs→PowerKit.Extensions.DirectoryExtensions.Copy(now provided by PowerKit 0.0.0-a.5)Onova.Tests— deleted:Utils/Extensions/DirectoryExtensions.cs→PowerKit.Extensions.DirectoryExtensions(Reset,TryDelete)Utils/Extensions/ZipExtensions.cs→PowerKit.Extensions.ZipArchiveEntryExtensions(WriteAllBytes,ReadAllText)All test spec classes (
Resolving/× 5,Extracting/× 2,UpdateSpecs) now usePowerKit.TempDirectory.Create()instead of the manualTempDirPath+Directory.Reset()+Directory.TryDelete()pattern, eliminating the boilerplate per class.Notable details
HttpClientExtensions.CopyToStreamAsyncnow delegates to PowerKit'sstream.CopyToAsync(destination, contentLength, progress, ct), eliminating the manual read loop.NugetPackageExtractorandZipPackageExtractorextractors useprogress?.Pipe(...)to inline the per-entry progress adapter directly into theCopyToAsynccall, capturingentryBaseOffsetbefore the lambda to avoid stale-closure issues with the mutabletotalBytesCopied:UpdateSpecs.Dispose,DummyEnvironment.Cleanup) that must distinguishDirectoryNotFoundExceptionfromUnauthorizedAccessException,Directory.Deleteis used directly rather thanTempDirectory.DisposeorDirectory.TryDelete, since the latter swallows all exceptions.