Deprecated: Function get_magic_quotes_gpc() is deprecated in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 99

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 619

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1169

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176
10BC0 riverpod 3.0.0 support by lucavenir · Pull Request #425 · Frezyx/talker · GitHub
Nothing Special   »   [go: up one dir, main page]

Skip to content

Conversation

lucavenir
Copy link
Contributor
@lucavenir lucavenir commented Sep 13, 2025

riverpod 3.0 is out!

this fixes #424

Summary by Sourcery

Migrate the package to Riverpod 3.0 by updating observer interfaces, provider APIs, imports, and test code, and bump dependency constraints accordingly.

New Features:

  • Adopt Riverpod 3 provider observer signatures with ProviderObserverContext
  • Switch to NotifierProvider.autoDispose and ProviderContainer.test from Riverpod 3 APIs

Enhancements:

  • Update pubspecs to require Riverpod 3.0 and new SDK, dependency, and lint versions
  • Simplify log class constructors and adjust import paths to riverpod/misc.dart and riverpod/legacy.dart

Tests:

  • Refactor tests to use Riverpod 3’s new provider types, listening patterns, and autoDispose behavior

Copy link
Contributor
sourcery-ai bot commented Sep 13, 2025

Reviewer's Guide

This PR upgrades the package to Riverpod 3.0.0 by migrating the test suite to the new Notifier and ProviderContainer.test APIs, refactoring the observer and log classes to use the updated ProviderObserverContext signatures, and bumping dependency versions and imports across pubspecs and source files.

Class diagram for ProviderObserverContext usage in observer methods

classDiagram
  class ProviderObserverContext {
    + ProviderBase<Object?> provider
    // Other context fields (not shown)
  }
  class TalkerRiverpodObserver {
    + didAddProvider(ProviderObserverContext context, Object? value)
    + didUpdateProvider(ProviderObserverContext context, Object? previousValue, Object? newValue)
    + didDisposeProvider(ProviderObserverContext context)
    + providerDidFail(ProviderObserverContext context, Object error, StackTrace stackTrace)
  }
  TalkerRiverpodObserver --> ProviderObserverContext
Loading

File-Level Changes

Change Details Files
Adapt tests to Riverpod 3 Notifier and ProviderContainer.test APIs
  • Replaced custom createContainer with ProviderContainer.test and added pump/listen/sub.read for async flows
  • Replaced StateNotifier/FamilyNotifier with Notifier-based TestNotifier and FamilyTestNotifier and autoDispose providers
  • Updated error-provider tests to use listen().read() and explicit sub.close(), added tearDown to clean talker history
packages/talker_riverpod_logger/test/observer_test.dart
packages/talker_riverpod_logger/test/logs_test.dart
Refactor TalkerRiverpodObserver to use ProviderObserverContext
  • Updated method signatures (didAddProvider, didUpdateProvider, didDisposeProvider, providerDidFail) to accept ProviderObserverContext
  • Removed container parameters and simplified early-return guards and registerKeys formatting
  • Switched from provider param to context.provider and adjusted error filter naming
packages/talker_riverpod_logger/lib/talker_riverpod_logger_observer.dart
Update log classes and settings for new Riverpod imports and concise constructors
  • Changed imports from riverpod/riverpod.dart to riverpod/misc.dart in logs and settings
  • Refactored super initializers in riverpod_logs.dart for one-line formatting
packages/talker_riverpod_logger/lib/riverpod_logs.dart
packages/talker_riverpod_logger/lib/talker_riverpod_logger_settings.dart
Bump dependencies and SDK constraints for Riverpod 3.0.0
  • Updated riverpod to ^3.0.0 and other package versions in example and package pubspecs
  • Raised Dart SDK constraints to >=3.9.0 and upgraded lints/test versions
packages/talker_riverpod_logger/example/pubspec.yaml
packages/talker_riverpod_logger/pubspec.yaml

Assessment against linked issues

Issue Objective Addressed Explanation
#424 Update the codebase to support Riverpod v3, including necessary code, test, and dependency changes.
#424 Update documentation and pubspec files to reflect Riverpod v3 support.

Possibly linked issues

  • support riverpod v3 #424: The PR updates the Riverpod dependency to 3.0.0 and adjusts tests, directly addressing the issue's request for Riverpod 3.0 support.
  • support riverpod v3 #424: The PR updates the riverpod dependency to version 3.0.0, which resolves the riverpod v3 update tracked in the issue.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor
@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `packages/talker_riverpod_logger/lib/talker_riverpod_logger_observer.dart:35` </location>
<code_context>
+
+    if (!settings.enabled || !settings.printProviderAdded) return;
+
+    final accepted = settings.providerFilter?.call(context.provider) ?? true;
+    if (!accepted) return;
+
     _talker.logCustom(
</code_context>

<issue_to_address>
Provider filter logic is duplicated across methods.

Extract the provider filter logic into a shared helper to avoid repetition and improve maintainability.

Suggested implementation:

```
  bool _isProviderAccepted(ProviderBase provider) {
    return settings.providerFilter?.call(provider) ?? true;
  }

  void didAddProvider(ProviderObserverContext context, Object? value) {
    super.didAddProvider(context, value);

    if (!settings.enabled || !settings.printProviderAdded) return;

    if (!_isProviderAccepted(context.provider)) return;

    _talker.logCustom(
      RiverpodAddLog(
        provider: context.provider,
        value: value,
        settings: settings,
      ),

```

You should also update other methods in this file (such as `didUpdateProvider`, `didDisposeProvider`, etc.) that use the provider filter logic to use the new `_isProviderAccepted` helper for consistency and maintainability.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov-commenter
Copy link
codecov-commenter commented Sep 13, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (1ed15ab) to head (ace0a4b).
⚠️ Report is 100 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           master      #425      +/-   ##
===========================================
+ Coverage   98.63%   100.00%   +1.36%     
===========================================
  Files           3         3              
  Lines         146        77      -69     
===========================================
- Hits          144        77      -67     
+ Misses          2         0       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lucavenir
Copy link
Contributor Author

done! looks like this PR is ready to merged, whenever, unless you have something to say about it @Frezyx

Copy link
Contributor Author

up

@lucavenir
Copy link
Contributor Author

Hello 👋🏼

@Frezyx sorry for pinging you, but I'd really love to see talker support riverpod v3.

@GusRodrigues86
Copy link

Looking forward for this one.

down to `^1.15.0`
@Frezyx Frezyx merged commit 18d99ac into Frezyx:master Oct 9, 2025
3 checks passed
@Frezyx
Copy link
Owner
Frezyx commented Oct 9, 2025

Hello @lucavenir !
Thank you so much for this contribution ❤️
Sorry for the long delay

Now 5.0.2 version is available for download on pub

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.

support riverpod v3

5 participants

0