Skip to content

Add weather example and fix reactive method body rewrites#98

Merged
nank1ro merged 3 commits into
mainfrom
t3code/5b17e317
May 14, 2026
Merged

Add weather example and fix reactive method body rewrites#98
nank1ro merged 3 commits into
mainfrom
t3code/5b17e317

Conversation

@nank1ro
Copy link
Copy Markdown
Owner

@nank1ro nank1ro commented May 14, 2026

Summary

  • New weather example (examples/weather/) stress-tests Solid generator on @SolidQuery(debounce:), .refresh(), per-instance resources keyed off widget constructor params, and three-level @SolidEnvironment chains
  • Fix: Widget constructor field rewrites@SolidQuery, @SolidEffect, and @SolidState getter bodies now correctly rewrite bare widget-bound field references to widget.X (same rewrite as build() method). Added three regression test goldens
  • Fix: Arrow-body Future query validation — removed over-strict validation that rejected Future<T> queries with arrow bodies; all four body shapes (=> expr, async => expr, { return expr; }, async { return expr; }) are now accepted
  • Docs: Remove deprecated build_runner flag — updated docs and scripts to drop --delete-conflicting-outputs (removed in recent build_runner versions; deletion is now implicit)
  • Evaluation docexamples/weather/EVALUATION.md documents findings, root causes, fixes, and lingering generator restrictions encountered during authoring

Testing

  • dart run build_runner build passes cleanly in examples/weather/
  • dart analyze --fatal-infos passes in examples/weather/
  • dart format --set-exit-if-changed . passes in examples/weather/
  • New regression goldens verify widget ctor field rewrites in @SolidQuery, @SolidEffect, and @SolidState getter bodies
  • Removed rejection test future_without_async and replaced with positive golden query_future_arrow_body

- Add comprehensive weather example exercising @SolidQuery debounce, parallel resources, widget ctor field reads, and three-deep @SolidEnvironment chains
- Fix widget→state scope shift missing in @SolidQuery/@SolidEffect/@SolidState getter bodies; rewrite now applies to all reactive member bodies, not just build()
- Remove over-strict validation rejecting Future queries with arrow bodies
- Update documentation; remove obsolete --delete-conflicting-outputs flag from build_runner commands
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying solid with  Cloudflare Pages  Cloudflare Pages

Latest commit: 513a770
Status: ✅  Deploy successful!
Preview URL: https://8038d857.solid-4m0.pages.dev
Branch Preview URL: https://t3code-5b17e317.solid-4m0.pages.dev

View logs

nank1ro added 2 commits May 14, 2026 17:29
When @SolidQuery reads cross-class signals via @SolidEnvironment receiver,
the synthesized Record-Computed source now auto-injects the field types it
names into lib output during cross-file resolution. Eliminates manual
// ignore: unused_import workarounds. Includes test coverage for both
imported and unimported cross-class type scenarios.
@nank1ro nank1ro merged commit 46d7b58 into main May 14, 2026
1 check passed
@nank1ro nank1ro deleted the t3code/5b17e317 branch May 14, 2026 15:51
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