Remove deprecated inferSchema library function#19
Open
hakimjonas wants to merge 1 commit into
Open
Conversation
Deprecated in 0.9.0 (lossy type-name output, no round-trip) with removal scheduled for 1.0; removing it now in the 0.14.0 cycle. Replacements already exist and are exported: renderJsonSchema(shapeOf(value)) for a JSON Schema document, or shapeOf(value) for the Shape ADT. - Delete the function from lib/src/output.dart and its export from lib/lambe.dart. - Remove the inferSchema test group + the one inferSchema case in the Ring 6 group from test/ring6_test.dart. No coverage lost: shapeOf and renderJsonSchema have their own suites (schema_renderer_test.dart). - Update example/example.dart to renderJsonSchema(shapeOf(data)). - CHANGELOG: Breaking entry. CLI and MCP unaffected (neither used it). analyze/format/lint-changelog/ generated-files green; full suite 1680 pass.
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.
First item of the 0.14.0 cycle.
Why
inferSchemawas deprecated in 0.9.0 — it emitted a lossy type-name structure ({a: "number"}) that doesn't round-trip — with removal scheduled for 1.0. Removing it now in 0.14.0.What
lib/src/output.dart) and its export (lib/lambe.dart).inferSchematest group + the one inferSchema case in the Ring 6 group (test/ring6_test.dart). No coverage lost — the replacementsshapeOf/renderJsonSchemahave their own suites (schema_renderer_test.dart).example/example.dartto the replacement:renderJsonSchema(shapeOf(data)).## Unreleased→ Breaking entry.Replacement (already exported)
renderJsonSchema(shapeOf(value))→ JSON Schema document that round-trips withparseJsonSchemashapeOf(value)→ theShapeADTImpact
Breaking for
package:lambelibrary consumers only. CLI and MCP unaffected — neither used it. Deprecated for 4 releases (0.9→0.13), so defensible.Verification
analyze --fatal-infos,format,lint-changelog,generated-files-in-syncall green; full suite 1680 pass (down 7 = the removed inferSchema assertions); example runs and emits JSON Schema.Note: pubspec stays at 0.13.0 here; the 0.14.0 version bump lands in the final release PR.