Enhance public API and add trimming compatibility attributes - #104
Merged
Conversation
…chemaTable methods for trimming compatibility
…-api-v3.0.0 chore: promote public API for v3.0.0
Benchmark ResultsMeasured on ExcelReader.Benchmarks.ColdStartBenchmark
ExcelReader.Benchmarks.CsvParseBenchmark
ExcelReader.Benchmarks.CsvReadBenchmark
ExcelReader.Benchmarks.CsvWriteBenchmark
ExcelReader.Benchmarks.ParseBenchmark
ExcelReader.Benchmarks.ReadBenchmark
ExcelReader.Benchmarks.RealDataReadBenchmark
ExcelReader.Benchmarks.RecordWriteBenchmark
ExcelReader.Benchmarks.WriteBenchmark
ExcelReader.Benchmarks.XlsReadBenchmark
ExcelReader.Benchmarks.XlsWriteBenchmark
|
CI on PR #104 (develop -> master) failed nearly every job with RS0016/RS0017: "HeaderNormalization.RemoveDiacritics" not declared, and 4 stale ExcelRecordMapBuilder<T> entries declared in Shipped.txt but no longer in code. Root cause: promote_public_api.py's union (`shipped_entries.update(new_entries)`) never special-cased a `*REMOVED*Foo` entry. Such an entry only ever means "delete Foo from Shipped" - the script instead added the literal `*REMOVED*Foo` string as a new entry while leaving the real `Foo` line untouched, so a plain entry that should have been deleted from Shipped.txt survived every future promotion. This is what let the ExcelRecordMapBuilder<T> refactor's *REMOVED* markers (added when the type became generic in TRow) leak through the v3.0.0 promotion (PR #103) without deleting the old non-generic entries. RS0024 also forbids a *REMOVED* line inside Shipped.txt at all ("shipped API file can't have removed members") - the correct behavior is to delete the matching plain entry and discard the *REMOVED* line itself, never copy it. Also fixes a second, unrelated mistake on develop: HeaderNormalization is declared in ExcelReader.Core, but its RemoveDiacritics entry had been added to ExcelReader.Arrow's PublicAPI.Unshipped.txt (a different project's own API surface) instead of ExcelReader.Core's Shipped.txt - so it fixed nothing. Changes: - promote_public_api.py: extract promote_one(unshipped, shipped) and make it delete a REMOVED entry's plain counterpart from Shipped instead of unioning the literal *REMOVED* string into it. - .github/scripts/test_promote_public_api.py: new unit tests, including a replay of the exact ExcelRecordMapBuilder<T> scenario that broke this. - ci.yml: run those tests on every PR (this script previously had zero coverage and only ran unattended during a real release). - PublicAPI/*/Shipped.txt (Core): drop the 4 stale ExcelRecordMapBuilder<T> entries; add the missing HeaderNormalization.RemoveDiacritics entry. - PublicAPI/*/Unshipped.txt (Arrow): remove the misplaced RemoveDiacritics line. Verified: dotnet build ExcelReader.slnx -c Release is clean (0/0), full test suite passes (1467/1467, Release/net10.0), and a promote_one() replay against the real pre-fix Unshipped/Shipped content produces the correct result.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #104 +/- ##
=======================================
Coverage 85.76% 85.76%
=======================================
Files 164 164
Lines 11827 11827
Branches 2159 2159
=======================================
Hits 10143 10143
Misses 1299 1299
Partials 385 385 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
No description provided.