schultek / jaspr

Modern web framework for building websites in Dart. Supports SPAs and SSR.
https://jasprpad.schultek.de
MIT License
996 stars 59 forks source link

fix: SyncProvider does not work after upgrading Jaspr to v0.12.0 #228

Closed siesdart closed 1 month ago

siesdart commented 2 months ago

Description

After upgrading Jaspr to v0.12.0, I discovered an issue where pages would not render with infinity browser loading when using SyncProvider. I confirmed that if I remove SyncProviderDependencies and preloadDependencies from the component, rendering itself is possible, but there are cases where data from SyncProvider is not rendered properly because preload does not proceed.

Steps To Reproduce

  1. Download the Riverpod example
  2. Upgrade Jaspr packages to v0.12.0 in the project
  3. Serve the app
  4. See infinity loading
  5. Note: In this official example, the app appears to run properly even though I remove SyncProviderDependencies. However, when I actually used it in my projects, I found that in many cases, if SyncProviderDependencies was removed and preload did not proceed, the data was not rendered properly

Doctor Output

[✓] Jaspr CLI (Version 0.12.0)
  • Dart Version 3.3.4 (stable) (Tue Apr 16 19:56:12 2024 +0000) on "macos_arm64" at /opt/homebrew/Caskroom/flutter/3.19.6/flutter/bin/cache/dart-sdk/bin/dart
  • Running on macos Version 14.4.1 (Build 23E224) - Locale ko-KR
  • Analytics: Enabled

[✓] Current Project
  • Dependencies on core packages:
    • jaspr: ^0.12.0
    • jaspr_builder: ^0.12.0 (dev)
    • jaspr_riverpod: ^0.3.11
  • Rendering mode: server
  • Uses jaspr compilers: false
  • Uses flutter embedding: false

Expected Behavior

Pages should be rendered properly with synced data

schultek commented 2 months ago

Thanks I will look into it.

schultek commented 1 month ago

Fixed in 0.13.0