Repository navigation
Mark public types non_exhaustive so that later additions do not break users again - #158
Merged
Merged
Conversation
… users again - Add #[non_exhaustive] to the error enums, the enums of values read from the file formats, BinaryFormat, and the structs with all-public fields read from the formats, such as CsvOptions, JetFormat, MacroAction and TableDef - Leave out closed types, such as IndexColumnOrder, TextEncoding and RowPosition, and the types the tests of the CLI and jetdb-wasm build with struct literals: CatalogEntry, ColumnDef, IndexDef, Relationship and FormEntry - Build CsvOptions from Default in jetdb export, jetdb-wasm and the example of the documentation, since a struct literal of it no longer compiles outside the crate - Add wildcard arms to the matches of the CLI and jetdb-wasm on these enums, keeping the output of the existing variants Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CoverageFor 97bd5ba. |
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.
Summary
#[non_exhaustive], so every variant or field added after 0.4.0 would break users again. 0.4.0 already breaks the API, so marking them now costs the least.FileError,FormatError,Value,ColumnType,ObjectType,BlobValue,MacroStatementandVbaModuleType, and 23 structs whose fields are all public, such asCsvOptions,JetFormat,TableDef,MacroActionand the form and property structs.IndexColumnOrder,FormObjectType,TextEncoding,RowPosition, and pairs such asRelationshipColumn), andCatalogEntry,ColumnDef,IndexDef,RelationshipandFormEntry, which the tests of the CLI and jetdb-wasm build with struct literals; a field added to them breaks only code that builds them that way.CsvOptionsis now built fromDefaultinjetdb export, jetdb-wasm and the example in the crate documentation and docs/lib (English and Japanese). The CLI and jetdb-wasm get wildcard arms on these enums.prop,exportandexportwith every option for the 2,105 tables of the test data, 6,436 files, is the same before and after, with the same exit codes and stderr.🤖 Generated with Claude Code