feat: implement ISupportDryRun on FixedWidthLoader (#197) - #215
Merged
Conversation
FixedWidthLoader<TRecord> now implements ISupportDryRun (Abstractions 0.15.0). When IsDryRun is true the loader runs the full pipeline — enumerate, evaluate SkipItemCount/MaximumItemCount, increment progress counters, fire the progress-timer callback, log, and validate field widths — but writes nothing to the output stream. Implementation routes formatting through TextWriter.Null in dry-run so field-width validation still runs while the real writer is untouched, and skips the owned-writer flush (which would otherwise emit the StreamWriter UTF-8 BOM on .NET Framework and register as a side effect). - Add SupportsDryRunContractTests-derived FixedWidthLoaderDryRunContractTests. - Add IsDryRun to PublicAPI.Unshipped.txt and a CHANGELOG [Unreleased] entry. Verified locally: full 13-TFM matrix 294/294 green, 95.2% coverage. Closes #197 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Chris-Wolfgang
commented
Jul 15, 2026
| } | ||
|
|
||
| if (_ownsWriter) | ||
| await FlushIfOwnedAsync(token).ConfigureAwait(false); |
This was referenced Jul 15, 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.
Implements
ISupportDryRunonFixedWidthLoader<TRecord>— part of the fleet-wide dry-run rollout (Abstractions 0.15.0, already referenced).Behavior
When
IsDryRunistrue, the loader runs the full pipeline — enumerate the source, evaluateSkipItemCount/MaximumItemCount, increment progress counters, fire the progress-timer callback, log, and validate field widths — but writes nothing to the output stream. Defaults tofalse.Implementation
TextWriter.Nullin dry-run, so field-width validation still runs (a dry run surfacesFieldOverflowExceptionexactly like a real run) while the real writer is left untouched.StreamWriteremits its UTF-8 BOM on .NET Framework even with no content, which the contract treats as a side effect (the same quirk ETL-Json ci(docfx): sync docfx.yaml to canonical #200 hit). Caught locally by the full-matrix gate before pushing.Tests / surface
FixedWidthLoaderDryRunContractTests : SupportsDryRunContractTests<FixedWidthLoader<PersonRecord>>(TestKit.Xunit 0.10.0, already referenced).IsDryRunadded toPublicAPI.Unshipped.txt; CHANGELOG[Unreleased]entry. Additive surface → MINOR (version bump deferred to release prep, per the vNext flow).Local verification (full pr.yaml gate via dotnet)
Closes #197