Skip to content

Lambe 0.7.1#5

Merged
hakimjonas merged 1 commit into
mainfrom
release/0.7.1
May 1, 2026
Merged

Lambe 0.7.1#5
hakimjonas merged 1 commit into
mainfrom
release/0.7.1

Conversation

@hakimjonas
Copy link
Copy Markdown
Owner

Summary

UX polish on top of 0.7.0. Remediation suggestions now surface the intent-level as(<format>) form in every bridge-offering surface (CLI errors, REPL, MCP, playground) instead of the raw to_entries / {items: .} fragment. The template that runs is unchanged, so composed queries produce identical output.

Changed

  • as(<format>) in error suggestions. $ lam --to csv '.deps' file.yaml now says Try appending | as(csv) with an explanation that names the underlying mechanism (to_entries) for transparency.
  • Remediation.display and Remediation.template decouple. New Remediation.withDisplay() factory lets display text differ from the runtime AST's source. Remediation() unchanged.
  • Curated template ASTs are parsed lazily on first use and shared across format-parameterized factories instead of re-parsed on every shape error.

Test plan

  • 962 tests pass (same count as 0.7.0; two assertions updated in shape_check_test.dart and apply_surfaces_test.dart to reflect the new display)
  • dart analyze --fatal-infos: clean
  • dart format --set-exit-if-changed .: clean
  • dart doc --dry-run: 0 warnings, 0 errors
  • dart pub publish --dry-run: 0 warnings
  • pana: 160/160
  • Manual smoke test: lam --to csv .dependencies pubspec.yaml prints the new | as(csv) suggestion
  • Manual smoke test: lam --to csv '.dependencies | as(csv)' pubspec.yaml still produces correct output
  • Release workflow passes on all 5 platform matrix cells
  • Tag v0.7.1 and dart pub publish after merge

Not breaking

  • Remediation() constructor unchanged (still sets display = source).
  • Remediation.template still the raw AST, so applyBridge() consumers see no change.
  • No other public API changes.

Docs

  • README.md: opening example and Shape-aware-output example updated to show new display form; added one line about the explanation naming the raw fragment for transparency.
  • CHANGELOG.md: new 0.7.1 entry.
  • ROADMAP.md: 0.7.1 added to shipped section.
  • doc/lam.1.md, doc/lam.1, doc/getting-started.md: version bumps.

Error messages, REPL prompts, MCP responses, and playground
suggestions now display the intent-level `as(csv)` form instead of
the raw `to_entries` / `{items: .}` fragment. The template that
runs is unchanged, so every surface tells the same 0.6.0 shape
story: `as(<format>)` bridges shape mismatches inside the query
language.

- lib/src/shape/check.dart: Remediation gains a `withDisplay`
  factory that decouples display from the runtime template. The
  four curated remediations become format-parameterized factories
  (`_toEntriesAsRows(fmt)`, `_wrapItems(fmt)`, etc.) that emit
  `display: 'as(<fmt>)'` while the template still points at the
  raw AST. The explanation names the underlying mechanism for
  transparency.
- test/shape_check_test.dart, test/apply_surfaces_test.dart:
  assertions updated to the new display form. 962 tests pass.
- README.md: the two opening error-message examples updated to
  reflect the new display; added a line about the explanation
  naming the raw fragment.
- doc/lam.1.md / doc/lam.1: source bumped to Lambë 0.7.1.
- doc/getting-started.md: REPL banner v0.7.0 → v0.7.1, pubspec
  example updated.
- CHANGELOG.md: new 0.7.1 entry (Changed + Why sections).

No breaking API changes; Remediation.new still sets
display = source (default behaviour unchanged), and the template
AST continues to be the raw fragment so applyBridge() consumers
are unaffected.
@hakimjonas hakimjonas merged commit 49b2ad4 into main May 1, 2026
3 checks passed
@hakimjonas hakimjonas deleted the release/0.7.1 branch May 1, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant