Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [jaspr_riverpod] vsyncOverride is missing a variable #138

Closed
gadfly361 opened this issue Nov 13, 2023 · 2 comments
Closed

fix: [jaspr_riverpod] vsyncOverride is missing a variable #138

gadfly361 opened this issue Nov 13, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@gadfly361
Copy link
Contributor

Description

When trying to run the examples/flutter_embedding example, get the following error:

~/gadfly/temp/jaspr/examples/flutter_embedding/ [main*] jaspr serve
✓ [CLI] Starting jaspr in development mode... (5.3s)
[BUILDER] [ERROR] Error compiling dartdevc module:jaspr_riverpod|lib/jaspr_riverpod.ddc.js
[BUILDER] [ERROR] 
[BUILDER] [ERROR] packages/jaspr_riverpod/src/framework.dart:317:5: Error: The getter 'vsyncOverride' isn't defined for the class '_UncontrolledProviderScopeElement'.
[BUILDER] [ERROR] - '_UncontrolledProviderScopeElement' is from 'package:jaspr_riverpod/src/framework.dart' ('packages/jaspr_riverpod/src/framework.dart').
[BUILDER] [ERROR] Try correcting the name to the name of an existing getter, or defining a getter or field named 'vsyncOverride'.
[BUILDER] [ERROR] vsyncOverride ??= _jasprVsync;
[BUILDER] [ERROR] ^^^^^^^^^^^^^
[BUILDER] [ERROR] packages/jaspr_riverpod/src/framework.dart:317:5: Error: The setter 'vsyncOverride' isn't defined for the class '_UncontrolledProviderScopeElement'.
[BUILDER] [ERROR] - '_UncontrolledProviderScopeElement' is from 'package:jaspr_riverpod/src/framework.dart' ('packages/jaspr_riverpod/src/framework.dart').
[BUILDER] [ERROR] Try correcting the name to the name of an existing setter, or defining a setter or field named 'vsyncOverride'.
[BUILDER] [ERROR] vsyncOverride ??= _jasprVsync;
[BUILDER] [ERROR] ^^^^^^^^^^^^^
[BUILDER] [ERROR] packages/jaspr_riverpod/src/framework.dart:373:9: Error: The getter 'vsyncOverride' isn't defined for the class '_UncontrolledProviderScopeElement'.
[BUILDER] [ERROR] - '_UncontrolledProviderScopeElement' is from 'package:jaspr_riverpod/src/framework.dart' ('packages/jaspr_riverpod/src/framework.dart').
[BUILDER] [ERROR] Try correcting the name to the name of an existing getter, or defining a getter or field named 'vsyncOverride'.
[BUILDER] [ERROR] if (vsyncOverride == _jasprVsync) {
[BUILDER] [ERROR] ^^^^^^^^^^^^^
[BUILDER] [ERROR] packages/jaspr_riverpod/src/framework.dart:374:7: Error: The setter 'vsyncOverride' isn't defined for the class '_UncontrolledProviderScopeElement'.
[BUILDER] [ERROR] - '_UncontrolledProviderScopeElement' is from 'package:jaspr_riverpod/src/framework.dart' ('packages/jaspr_riverpod/src/framework.dart').
[BUILDER] [ERROR] Try correcting the name to the name of an existing setter, or defining a setter or field named 'vsyncOverride'.
[BUILDER] [ERROR] vsyncOverride = null;

Steps To Reproduce

  1. Clone jaspr repo (this Issue was made against the commit: 3495cfd0693fed99a34ffec0f9f0b8ac9bbfb18e)
  2. cd examples/flutter_embedding
  3. install dependencies
  4. jaspr serve

Doctor Output

~/gadfly/temp/jaspr/examples/flutter_embedding/ [main*] jaspr doctor
[✓] Jaspr CLI (Version 0.9.3)
  • Dart Version 3.1.1 (stable) (Tue Sep 5 12:20:14 2023 +0000) on "macos_x64" at /Users/matthew/fvm/versions/3.13.3/bin/cache/dart-sdk/bin/dart
  • Running on macos Version 13.3.1 (a) (Build 22E772610a) - Locale en-US
  • Analytics: Enabled

[✓] Current Project
  • Dependencies on core packages:
    • jaspr: ^0.9.0
    • jaspr_builder: ^0.9.0 (dev)
    • jaspr_web_compilers: ^4.0.5 (dev)
    • jaspr_flutter_embed: ^0.1.4
    • jaspr_riverpod: ^0.3.6
  • Uses server-side rendering: true
  • Uses experimental compilers: true
  • Uses flutter embedding: true

Expected Behavior

For the flutter_embedding example to have been served to localhost:8080 without hitting an error.

Additional Context

I think this commit may have introduced the regression.

@gadfly361 gadfly361 added the bug Something isn't working label Nov 13, 2023
@gadfly361 gadfly361 changed the title fix: fix: [jaspr_riverpod] vsyncOverride is missing a variable Nov 13, 2023
gadfly361 added a commit to gadfly361/jaspr that referenced this issue Nov 14, 2023
@schultek
Copy link
Owner

schultek commented Nov 14, 2023

This actually comes from a change in riverpod, where vsyncOverride was removed in the latest version:
rrousselGit/riverpod#3072

So we definitely need to fix this, but we also need to update the version constraint for riverpod.

gadfly361 added a commit to gadfly361/jaspr that referenced this issue Nov 14, 2023
@gadfly361
Copy link
Contributor Author

@schultek Thanks for finding the root cause! I updated #139 accordingly

schultek pushed a commit that referenced this issue Dec 14, 2023
fix #138: [jaspr_riverpod] update vsyncOverride to flutterVsyncs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants