Finish Write Async#1323
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/adamhathcock/sharpcompress/sessions/6e4dec7d-12cd-4044-9935-4d354b911d11 Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
… writers and compressors Agent-Logs-Url: https://github.com/adamhathcock/sharpcompress/sessions/6e4dec7d-12cd-4044-9935-4d354b911d11 Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
…writes in async code paths Agent-Logs-Url: https://github.com/adamhathcock/sharpcompress/sessions/6e4dec7d-12cd-4044-9935-4d354b911d11 Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
…only-stream-writes
release test cleanup
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Fix GZip write async
tonycknight
pushed a commit
to tonycknight/microbroker
that referenced
this pull request
May 31, 2026
Updated [SharpCompress](https://github.com/adamhathcock/sharpcompress) from 0.48.1 to 0.49.0. <details> <summary>Release notes</summary> _Sourced from [SharpCompress's releases](https://github.com/adamhathcock/sharpcompress/releases)._ ## 0.49.0 This should contain a lot of write async fixes and some breaking API changes that fix previous broke `net48` usage ## What's Changed * Rename IWriteableArchiveFactory.cs to IWritableArchiveFactory.cs by @Copilot in adamhathcock/sharpcompress#1244 * Some API clean up from GPT 5.4 by @adamhathcock in adamhathcock/sharpcompress#1243 * Release to master by @adamhathcock in adamhathcock/sharpcompress#1267 * Fix three BLAKE2sp correctness bugs and eliminate allocations in hot path by @coderb in adamhathcock/sharpcompress#1266 * Corrected async examples. by @dlemstra in adamhathcock/sharpcompress#1277 * Fix setting invalid access time fails extraction by @aromaa in adamhathcock/sharpcompress#1279 * Fix incorrect code examples in docs for sync/async usage by @Copilot in adamhathcock/sharpcompress#1280 * Replace APPNOTE.TXT contents with reference link note by @puk06 in adamhathcock/sharpcompress#1286 * Release to Master by @adamhathcock in adamhathcock/sharpcompress#1274 * update docs for tar gap analysis and XZ usage by @adamhathcock in adamhathcock/sharpcompress#1288 * Add a PooledMemoryStream to avoid allocating by @adamhathcock in adamhathcock/sharpcompress#1275 * fix: Change LeaveStreamOpen default from true to false by @puk06 in adamhathcock/sharpcompress#1293 * Fix usage of ReaderOptions and pre-defined values by @adamhathcock in adamhathcock/sharpcompress#1295 * Enforce seekable, readable and writable on streams by @adamhathcock in adamhathcock/sharpcompress#1297 * Add ArchiveInformation record for consolidated archive detection and capability inspection by @Copilot in adamhathcock/sharpcompress#1299 * merge release to master by @adamhathcock in adamhathcock/sharpcompress#1314 * Some clean up and test clean up by @adamhathcock in adamhathcock/sharpcompress#1321 * Finish Write Async by @adamhathcock in adamhathcock/sharpcompress#1323 * More complete Tar implementation: USTAR, PAX, etc. by @adamhathcock in adamhathcock/sharpcompress#1289 * Add Polysharp and adjustments that do not break legacy frameworks by @adamhathcock in adamhathcock/sharpcompress#1330 * Fix null `IVolume.FileName` for single-volume file-based archives by @Copilot in adamhathcock/sharpcompress#1333 * Add skills by @adamhathcock in adamhathcock/sharpcompress#1332 * add AOT smoke and missing tests by @adamhathcock in adamhathcock/sharpcompress#1334 ## New Contributors * @dlemstra made their first contribution in adamhathcock/sharpcompress#1277 * @aromaa made their first contribution in adamhathcock/sharpcompress#1279 * @puk06 made their first contribution in adamhathcock/sharpcompress#1286 **Full Changelog**: adamhathcock/sharpcompress@0.48.1...0.49.0 ## 0.49.0-beta.140 ## What's Changed * Add Polysharp and adjustments that do not break legacy frameworks by @adamhathcock in adamhathcock/sharpcompress#1330 **Full Changelog**: adamhathcock/sharpcompress@0.49.0-beta.136...0.49.0-beta.140 ## 0.49.0-beta.136 ## What's Changed * Rename IWriteableArchiveFactory.cs to IWritableArchiveFactory.cs by @Copilot in adamhathcock/sharpcompress#1244 * Some API clean up from GPT 5.4 by @adamhathcock in adamhathcock/sharpcompress#1243 * Release to master by @adamhathcock in adamhathcock/sharpcompress#1267 * Fix three BLAKE2sp correctness bugs and eliminate allocations in hot path by @coderb in adamhathcock/sharpcompress#1266 * Corrected async examples. by @dlemstra in adamhathcock/sharpcompress#1277 * Fix setting invalid access time fails extraction by @aromaa in adamhathcock/sharpcompress#1279 * Fix incorrect code examples in docs for sync/async usage by @Copilot in adamhathcock/sharpcompress#1280 * Replace APPNOTE.TXT contents with reference link note by @puk06 in adamhathcock/sharpcompress#1286 * Release to Master by @adamhathcock in adamhathcock/sharpcompress#1274 * update docs for tar gap analysis and XZ usage by @adamhathcock in adamhathcock/sharpcompress#1288 * Add a PooledMemoryStream to avoid allocating by @adamhathcock in adamhathcock/sharpcompress#1275 * fix: Change LeaveStreamOpen default from true to false by @puk06 in adamhathcock/sharpcompress#1293 * Fix usage of ReaderOptions and pre-defined values by @adamhathcock in adamhathcock/sharpcompress#1295 * Enforce seekable, readable and writable on streams by @adamhathcock in adamhathcock/sharpcompress#1297 * Add ArchiveInformation record for consolidated archive detection and capability inspection by @Copilot in adamhathcock/sharpcompress#1299 * merge release to master by @adamhathcock in adamhathcock/sharpcompress#1314 * Some clean up and test clean up by @adamhathcock in adamhathcock/sharpcompress#1321 * Finish Write Async by @adamhathcock in adamhathcock/sharpcompress#1323 * More complete Tar implementation: USTAR, PAX, etc. by @adamhathcock in adamhathcock/sharpcompress#1289 ## New Contributors * @dlemstra made their first contribution in adamhathcock/sharpcompress#1277 * @aromaa made their first contribution in adamhathcock/sharpcompress#1279 * @puk06 made their first contribution in adamhathcock/sharpcompress#1286 **Full Changelog**: adamhathcock/sharpcompress@0.48.1...0.49.0-beta1 Commits viewable in [compare view](adamhathcock/sharpcompress@0.48.1...0.49.0). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This was referenced May 31, 2026
tonycknight
pushed a commit
to tonycknight/discorss
that referenced
this pull request
Jun 1, 2026
Updated [SharpCompress](https://github.com/adamhathcock/sharpcompress) from 0.48.1 to 0.49.1. <details> <summary>Release notes</summary> _Sourced from [SharpCompress's releases](https://github.com/adamhathcock/sharpcompress/releases)._ ## 0.49.1 ## What's Changed * Close writable entry streams during async archive disposal by @Copilot in adamhathcock/sharpcompress#1338 * Restore `WriteToDirectoryAsync` progress callbacks for solid 7z archives by @Copilot in adamhathcock/sharpcompress#1340 * Try to fix global.json to avoid churn in locks by @adamhathcock in adamhathcock/sharpcompress#1341 * Fix tar archive enumeration after fully reading entry streams by @adamhathcock in adamhathcock/sharpcompress#1342 **Full Changelog**: adamhathcock/sharpcompress@0.49.0...0.49.1 ## 0.49.0 This should contain a lot of write async fixes and some breaking API changes that fix previous broke `net48` usage ## What's Changed * Rename IWriteableArchiveFactory.cs to IWritableArchiveFactory.cs by @Copilot in adamhathcock/sharpcompress#1244 * Some API clean up from GPT 5.4 by @adamhathcock in adamhathcock/sharpcompress#1243 * Release to master by @adamhathcock in adamhathcock/sharpcompress#1267 * Fix three BLAKE2sp correctness bugs and eliminate allocations in hot path by @coderb in adamhathcock/sharpcompress#1266 * Corrected async examples. by @dlemstra in adamhathcock/sharpcompress#1277 * Fix setting invalid access time fails extraction by @aromaa in adamhathcock/sharpcompress#1279 * Fix incorrect code examples in docs for sync/async usage by @Copilot in adamhathcock/sharpcompress#1280 * Replace APPNOTE.TXT contents with reference link note by @puk06 in adamhathcock/sharpcompress#1286 * Release to Master by @adamhathcock in adamhathcock/sharpcompress#1274 * update docs for tar gap analysis and XZ usage by @adamhathcock in adamhathcock/sharpcompress#1288 * Add a PooledMemoryStream to avoid allocating by @adamhathcock in adamhathcock/sharpcompress#1275 * fix: Change LeaveStreamOpen default from true to false by @puk06 in adamhathcock/sharpcompress#1293 * Fix usage of ReaderOptions and pre-defined values by @adamhathcock in adamhathcock/sharpcompress#1295 * Enforce seekable, readable and writable on streams by @adamhathcock in adamhathcock/sharpcompress#1297 * Add ArchiveInformation record for consolidated archive detection and capability inspection by @Copilot in adamhathcock/sharpcompress#1299 * merge release to master by @adamhathcock in adamhathcock/sharpcompress#1314 * Some clean up and test clean up by @adamhathcock in adamhathcock/sharpcompress#1321 * Finish Write Async by @adamhathcock in adamhathcock/sharpcompress#1323 * More complete Tar implementation: USTAR, PAX, etc. by @adamhathcock in adamhathcock/sharpcompress#1289 * Add Polysharp and adjustments that do not break legacy frameworks by @adamhathcock in adamhathcock/sharpcompress#1330 * Fix null `IVolume.FileName` for single-volume file-based archives by @Copilot in adamhathcock/sharpcompress#1333 * Add skills by @adamhathcock in adamhathcock/sharpcompress#1332 * add AOT smoke and missing tests by @adamhathcock in adamhathcock/sharpcompress#1334 ## New Contributors * @dlemstra made their first contribution in adamhathcock/sharpcompress#1277 * @aromaa made their first contribution in adamhathcock/sharpcompress#1279 * @puk06 made their first contribution in adamhathcock/sharpcompress#1286 **Full Changelog**: adamhathcock/sharpcompress@0.48.1...0.49.0 ## 0.49.0-beta.140 ## What's Changed * Add Polysharp and adjustments that do not break legacy frameworks by @adamhathcock in adamhathcock/sharpcompress#1330 **Full Changelog**: adamhathcock/sharpcompress@0.49.0-beta.136...0.49.0-beta.140 ## 0.49.0-beta.136 ## What's Changed * Rename IWriteableArchiveFactory.cs to IWritableArchiveFactory.cs by @Copilot in adamhathcock/sharpcompress#1244 * Some API clean up from GPT 5.4 by @adamhathcock in adamhathcock/sharpcompress#1243 * Release to master by @adamhathcock in adamhathcock/sharpcompress#1267 * Fix three BLAKE2sp correctness bugs and eliminate allocations in hot path by @coderb in adamhathcock/sharpcompress#1266 * Corrected async examples. by @dlemstra in adamhathcock/sharpcompress#1277 * Fix setting invalid access time fails extraction by @aromaa in adamhathcock/sharpcompress#1279 * Fix incorrect code examples in docs for sync/async usage by @Copilot in adamhathcock/sharpcompress#1280 * Replace APPNOTE.TXT contents with reference link note by @puk06 in adamhathcock/sharpcompress#1286 * Release to Master by @adamhathcock in adamhathcock/sharpcompress#1274 * update docs for tar gap analysis and XZ usage by @adamhathcock in adamhathcock/sharpcompress#1288 * Add a PooledMemoryStream to avoid allocating by @adamhathcock in adamhathcock/sharpcompress#1275 * fix: Change LeaveStreamOpen default from true to false by @puk06 in adamhathcock/sharpcompress#1293 * Fix usage of ReaderOptions and pre-defined values by @adamhathcock in adamhathcock/sharpcompress#1295 * Enforce seekable, readable and writable on streams by @adamhathcock in adamhathcock/sharpcompress#1297 * Add ArchiveInformation record for consolidated archive detection and capability inspection by @Copilot in adamhathcock/sharpcompress#1299 * merge release to master by @adamhathcock in adamhathcock/sharpcompress#1314 * Some clean up and test clean up by @adamhathcock in adamhathcock/sharpcompress#1321 * Finish Write Async by @adamhathcock in adamhathcock/sharpcompress#1323 * More complete Tar implementation: USTAR, PAX, etc. by @adamhathcock in adamhathcock/sharpcompress#1289 ## New Contributors * @dlemstra made their first contribution in adamhathcock/sharpcompress#1277 * @aromaa made their first contribution in adamhathcock/sharpcompress#1279 * @puk06 made their first contribution in adamhathcock/sharpcompress#1286 **Full Changelog**: adamhathcock/sharpcompress@0.48.1...0.49.0-beta1 Commits viewable in [compare view](adamhathcock/sharpcompress@0.48.1...0.49.1). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This was referenced Jun 1, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Master version of #1311
This pull request primarily improves async code reliability and consistency across the archive codebase by ensuring proper use of
ConfigureAwait(false)in all asynchronous enumerations and method calls. It also refines the API for opening tar archives by simplifying how compression types are determined, and adds or corrects cancellation support in GZip archive entries. Additionally, there are dependency updates and minor code cleanups.Async reliability and consistency improvements:
Added
.ConfigureAwait(false)to allawait foreachand async method calls in archive-related async enumerables and methods. This ensures correct context handling and avoids deadlocks in library usage scenarios. (AbstractArchive.Async.cs,AbstractWritableArchive.Async.cs,IAsyncArchiveExtensions.cs,RarArchiveEntryFactory.cs) [1] [2] [3] [4] [5] [6] [7] [8]Added missing
using System.Threading;andusing System.Threading.Tasks;inGZipWritableArchiveEntry.csto support async and cancellation features.API and method improvements:
Updated the tar archive factory methods to pass the entire
ReaderOptionsobject instead of just theProvidersproperty when determining compression type, simplifying and unifying the API. [1] [2] [3] [4]Added an override for
OpenEntryStreamAsyncinGZipWritableArchiveEntrythat supports cancellation and wraps the synchronous method, improving consistency with the base class and async API expectations.Made
OpenEntryStreamAsyncinGZipArchiveEntryvirtual to allow overriding in derived classes.Dependency and code maintenance:
package-lock.jsonunder.opencodeto track npm dependencies for build or tooling purposes.using System.Threading.Tasks;inRarArchiveEntryFactory.csfor async method support.