Conversation
WalkthroughThis PR migrates the codebase to newer analyzer APIs and error models: Element → Element2 (and related name2/name3 accessors), DiagnosticReporter/DiagnosticSeverity/Diagnostic → ErrorReporter/ErrorSeverity/AnalysisError, resolveFile → resolveFile2, and broadens analyzer/build/source_gen pubspec ranges. Changes touch lints, analyzer utils, generators, tests, pubspecs, and docs. Changes
Sequence Diagram(s)(skip — changes are API surface/type migrations and do not introduce new control-flow sequences) Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related issues
Possibly related PRs
Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (12)
packages/riverpod_lint/lib/src/lints/notifier_build.dart (2)
31-49: False negatives: any member named "build" satisfies the check (fields/ctors included)The current predicate only matches by displayName; a field named “build” (or a ctor fragment) will bypass the lint. Restrict to instance methods.
Proposed fix:
- final hasBuildMethod = node.members - .where( - (e) => e.declaredFragment?.element.displayName == _buildMethodName, - ) - .isNotEmpty; + final hasBuildMethod = node.members.any((member) { + final el = member.declaredFragment?.element; + return el is MethodElement2 && + !el.isStatic && + el.displayName == _buildMethodName; + });
1-6: Adopt element2 API across workspace & tighten analyzer constraint
- In packages/riverpod_analyzer_utils_tests/test/nodes/dependencies_test.dart, replace
withimport 'package:analyzer/dart/element/element.dart';import 'package:analyzer/dart/element/element2.dart';- In packages/riverpod_lint/pubspec.yaml, bump the analyzer constraint from ^7.0.0 to ^7.3.0 to guarantee element2 support.
- Verify that hiding analyzer’s LintCode and using custom_lint_builder’s LintCode remains fully compatible with ErrorReporter.
packages/riverpod_lint/lib/src/lints/only_use_keep_alive_inside_keep_alive.dart (1)
18-22: Fix missing backtick in user-facing message."keepAlive." is missing the closing backtick.
Apply:
- 'it can only use providers that are also declared as `keepAlive.', + 'it can only use providers that are also declared as `keepAlive`.',packages/riverpod_generator/lib/src/parse_generator.dart (1)
30-38: Avoid potential null crash fromastNodeFor(... )!.root.
astNodeForcan return null (e.g., unresolved/parts). Mirror the null-tolerant handling used below and filter out nulls.- final ast = await Future.wait( - firstAnnotatedElementFromUniqueSource.values.map( - (e) => buildStep.resolver - .astNodeFor(e.firstFragment, resolve: true) - .then((value) => value!.root as CompilationUnit), - ), - ); + final units = await Future.wait( + firstAnnotatedElementFromUniqueSource.values.map( + (e) => buildStep.resolver + .astNodeFor(e.firstFragment, resolve: true) + .then((value) => value?.root as CompilationUnit?), + ), + ); + final ast = units.whereType<CompilationUnit>().toList(); - return generateForUnit(ast); + return generateForUnit(ast);packages/riverpod_lint/lib/src/assists/consumers/convert_to_stateless_base_widget.dart (2)
166-192: Avoid duplicate FieldDeclaration entries in nodesToMoveWhen a single FieldDeclaration declares multiple variables (e.g., int a, b;), the current loop may add the same member to nodesToMove multiple times, causing overlapping edits. Deduplicate per FieldDeclaration.
Apply:
- // Prepare nodes to move. - final nodesToMove = <ClassMember>[]; + // Prepare nodes to move. + final nodesToMove = <ClassMember>[]; + final addedFieldDecls = <FieldDeclaration>{}; @@ - for (final fieldNode in member.fields.variables) { + for (final fieldNode in member.fields.variables) { final fieldElement = fieldNode.declaredElement2 as FieldElement2?; if (fieldElement == null) continue; if (!fieldsAssignedInConstructors.contains(fieldElement)) { - nodesToMove.add(member); + if (addedFieldDecls.add(member)) { + nodesToMove.add(member); + } elementsToMove.add(fieldElement);
277-307: Replace deprecatedvariable3withvariable
Inpackages/riverpod_lint/lib/src/assists/consumers/convert_to_stateless_base_widget.dart, usages ofPropertyAccessorElement2.variable3must be updated toPropertyAccessorElement2.variable(deprecated in analyzer v7.x), and theanalyzerSDK constraint inpubspec.yamlshould be bumped to^7.0.0.packages/riverpod_analyzer_utils/lib/src/nodes/manual_providers/provider.dart (2)
84-96: Bug: provider may be set to the library prefix instead of the classFor targets like riverpod.Provider.autoDispose(...), decodeTarget sets provider to the prefix (riverpod), overwriting Provider. Only the identifier part of a PrefixedIdentifier should count as the provider type.
Apply:
- void decodeTarget(Expression? expression) { + void decodeTarget(Expression? expression) { if (expression is SimpleIdentifier) { decodeIdentifier(expression); } else if (expression is PrefixedIdentifier) { - decodeIdentifier(expression.identifier); - decodeIdentifier(expression.prefix); + // Use the identifier (e.g., "Provider"), ignore the prefix ("riverpod"). + decodeIdentifier(expression.identifier); } else { throw UnsupportedError( 'unknown expression "$expression" (${expression.runtimeType})', ); } }
209-213: Replace deprecatedelement3?.name3usage: In analyzer 7.x theDartTypeAPI no longer supportselement3/name3; usetype.element?.nameinstead (e.g. inpackages/riverpod_analyzer_utils/lib/src/nodes/manual_providers/provider.dartaround lines 209–213).packages/internal_lint/lib/src/lints/show_all.dart (1)
156-163: Missing space before ‘show’ produces invalid export syntaxThe insertion creates "...'path'dart'show A" (no space).
Apply:
- builder.write('show '); + builder.write(' show ');packages/riverpod_lint_flutter_test/test/test_lint.dart (1)
79-89: Fix double-await causing a type error in expect
changesis already awaited above;await changesin expect will fail.- expect( - await changes, + expect( + changes, matchesPrioritizedSourceChangesGolden( File(goldensFile), source: result.content, sourcePath: sourcePath, ), );packages/riverpod_analyzer_utils/lib/src/nodes/provider_for.dart (1)
20-27: Replace oldmetadataAPI usage in lint
Inpackages/riverpod_lint/lib/src/lints/notifier_build.dart:31, changenode.metadata.where((element) { … })to use the new API:
node.metadata2.annotations.where((element) { … })packages/riverpod_analyzer_utils_tests/test/analyzer_test_utils.dart (1)
306-313: Replace hard-coded path with dynamic library source- final errorResult = await library.session.getErrors( - '/test_lib/lib/foo.dart', - ); - errorResult as ErrorsResult; - - final errors = errorResult.errors + final errorsResult = await library.session.getErrors( + library.librarySource.fullName, + ) as ErrorsResult; + + final errors = errorsResult.errorsThis ensures errors are fetched from the actual test file path (including any generated package name) instead of the fixed
/test_lib/lib/foo.dart.
🧹 Nitpick comments (39)
packages/riverpod_lint/lib/src/lints/avoid_build_context_in_providers.dart (1)
48-52: Broaden match to types implementing BuildContextUsing
isAssignableFromTypewill also catch parameters typed as subtypes (e.g.,Element) that implementBuildContext.Apply:
- final buildContextParameters = parameters.parameters.where( - (e) => - e.declaredFragment?.element.type != null && - buildContextType.isExactlyType(e.declaredFragment!.element.type), - ); + final buildContextParameters = parameters.parameters.where((e) { + final type = e.declaredFragment?.element.type; + return type != null && buildContextType.isAssignableFromType(type); + });packages/riverpod_lint/lib/src/lints/scoped_providers_should_specify_dependencies.dart (2)
37-42: ConfirmLintCode(errorSeverity: ...)compatibility; default WARNING may be safer.Some analyzer/custom_lint versions don’t accept
errorSeverityin the LintCode ctor. If your supported range includes those, drop the param and rely on the default WARNING.static const _code = LintCode( name: 'scoped_providers_should_specify_dependencies', problemMessage: 'Providers which are overridden in a non-root ProviderContainer/ProviderScope should specify dependencies.', - errorSeverity: ErrorSeverity.WARNING, );If unsure, please check the currently pinned analyzer and custom_lint_builder docs/versions.
87-99: ClarifyhasParentsemantics to avoid false positives/negatives.
expression.parent != nullhinges on the analyzer-utils abstraction rather than AST shape. If the intent is “container is never root-scoped when instantiated as a parameter”, consider asserting via the AST (e.g., checking for an enclosing argument list/method invocation onexpression.node) or add a short comment referencing analyzer-utils’ contract forparent.packages/riverpod_lint/lib/src/lints/notifier_extends.dart (2)
58-62: Consider adding a correction message for better UX.Providing a short correction helps IDEs suggest the fix inline.
static const _code = LintCode( name: 'notifier_extends', problemMessage: r'Classes annotated by @riverpod must extend _$ClassName', errorSeverity: ErrorSeverity.WARNING, + correctionMessage: r'Extend the generated _$ClassName (including generic parameters, if any).', );
113-115: Silence the unused parameter lint.Rename
othersto_since it’s not used.- List<AnalysisError> others, + List<AnalysisError> _,packages/riverpod_lint/lib/src/assists/consumers/convert_to_widget_utils.dart (1)
180-208: Add focused tests to guard against analyzer API drift.Recommend unit tests covering:
x = 1,++x,x++,obj.prop = 1,a.b.c = 1, ensuring the getter returns the write element when applicable, otherwise the read element.packages/riverpod_lint/lib/src/lints/missing_provider_scope.dart (2)
19-25: Make LintCode severity version-agnostic.Some analyzer/custom_lint combos don’t accept
errorSeverityinLintCode. Default is already WARNING—consider dropping the param.static const _code = LintCode( name: 'missing_provider_scope', problemMessage: 'Flutter applications should have a ProviderScope widget ' 'at the top of the widget tree.', - errorSeverity: ErrorSeverity.WARNING, );
40-40: Nit: comment typo.Duplicate “if”.
- // runApp call detected, now checking if if the first widget is a ProviderScope + // runApp call detected, now checking if the first widget is a ProviderScopepackages/riverpod_lint/lib/src/lints/notifier_build.dart (2)
21-22: Severity escalated to ERROR — confirm policyChanging to ErrorSeverity.ERROR can break CI and downstream users. If that's not intentional, keep it at WARNING.
Apply if needed:
- errorSeverity: ErrorSeverity.ERROR, + errorSeverity: ErrorSeverity.WARNING,
66-87: Fix UX: insertion helper and default return type
- Prefer addInsertion with a writer for consistent indentation.
- Optional: if you can infer the notifier state type, emit it instead of dynamic (nice-to-have).
Suggested tweak:
- changeBuilder.addDartFileEdit((builder) { + changeBuilder.addDartFileEdit((builder) { final offset = node.leftBracket.offset + 1; - - builder.addSimpleInsertion(offset, ''' + builder.addInsertion(offset, (b) { + b.write(''' @override dynamic build() { // TODO: implement build throw UnimplementedError(); } -'''); +'''); + }); });If desired, I can follow up with a helper that infers the return type from the class’ supertype (Notifier/AsyncNotifier) and fills it in.
packages/riverpod_generator/test/error_test.dart (1)
151-155: Remove redundant cast; type the variable at assignment.Keeps the code concise and avoids a no-op cast.
Apply:
- final result = await resolveFile2(path: main.absolute.path); - - result as ResolvedUnitResult; + final ResolvedUnitResult result = + await resolveFile2(path: main.absolute.path);packages/riverpod_generator/test/doc_test.dart (1)
13-13: Prefer explicit typing over cast.Same nit as other tests.
Apply:
-final result = await resolveFile2(path: file.path) as ResolvedUnitResult; +final ResolvedUnitResult result = await resolveFile2(path: file.path);packages/riverpod_analyzer_utils/lib/src/nodes/provider_or_family.dart (1)
29-34: Prefer staticElement for robustness; keep PrefixElement2 check.On SimpleIdentifier, using staticElement is more robust across analyzer releases. Fall back to element only if needed.
- final element = expression.prefix.element; + // Prefer staticElement for analyzer v2 APIs; fall back for older shapes. + final element = expression.prefix.staticElement ?? expression.prefix.element; if (element is PrefixElement2) { providerPrefix = expression.prefix; parseExpression(expression.identifier); } else { parseExpression(expression.prefix); }Please confirm this compiles under your targeted analyzer 7.x floor.
packages/riverpod_analyzer_utils/lib/src/riverpod_types/core.dart (1)
75-83: element3/MixinElement2 usage implies a higher analyzer 7.x floor; align pubspecs.DartType.element3 and MixinElement2 may not exist in early 7.0.x. Ensure all packages in the workspace set analyzer to the minimum 7.x that provides these APIs (e.g., ^7.3.0), or gate usages accordingly. Given the migration, raising the lower bound is cleaner than shims.
# In affected pubspecs (e.g., internal_lint, riverpod_generator, etc.) - analyzer: ^7.0.0 + analyzer: ^7.3.0packages/internal_lint/lib/src/lints/generic_name.dart (1)
11-13: Fix grammar in user-facing lint message.“as least” → “at least”.
Apply:
- 'Suffix generics with an uppercase T and as least 2 characters.', + 'Suffix generics with an uppercase T and at least 2 characters.',packages/lint_visitor_generator/lib/builder.dart (2)
35-37: Annotation detection via toSource string equality is brittle.Comparing
toSource()to'@_ast'is fragile to formatting/arguments. Prefer checking the annotation’s element/name instead of stringifying.Example approach (conceptual):
- Inspect
e.metadata2.annotationsentries’elementAnnotation.element3and compare the annotation class/name.
41-47: Avoid force unwraps and rename shadowing parameter for clarity.
element3!/name3!can crash generation on unexpected types. Also, usingextensionas a parameter name is confusing.Apply:
- .expand((extension) { - final constraint = extension.extendedType; - - return extension.getters2 + .expand((ext) { + final constraintName = ext.extendedType.element3?.name3; + if (constraintName == null) return const Iterable.empty(); + return ext.getters2 .map( - (e) => ( - constraint: constraint.element3!.name3!, - type: e.returnType.element3!.name3!, - name: e.name3!, - ), + (g) => ( + constraint: constraintName, + type: g.returnType.element3?.name3, + name: g.name3, + ), ) - .where((e) => !e.name.startsWith('_cache')); + .where((e) => e.type != null && e.name != null && !e.name!.startsWith('_cache')) + .map((e) => (constraint: e.constraint, type: e.type!, name: e.name!));This removes
!and clarifies the variable name.packages/internal_lint/lib/src/lints/avoid_sub_read.dart (1)
44-45: Drop unusedargumentsto avoid confusion.Message has no placeholders; passing arguments is a no-op and inconsistent with the call below.
- reporter.atNode(node, _code, arguments: [targetType.toString()]); + reporter.atNode(node, _code);packages/riverpod_lint/lib/src/lints/async_value_nullable_pattern.dart (1)
100-104: Prefer inserting atoffsetafter deletion to avoid ordering pitfalls.Minor edit safety: insert at the same position you delete from.
- builder.addDeletion(node.operator.sourceRange); - - builder.addSimpleInsertion(node.operator.end, ', hasValue: true'); + builder.addDeletion(node.operator.sourceRange); + builder.addSimpleInsertion(node.operator.offset, ', hasValue: true');packages/riverpod_lint/lib/src/lints/avoid_public_notifier_properties.dart (1)
45-51: Consider simplifying the null-assertion logic.The function accepts
Element2?but immediately casts toAnnotatable?and then uses a non-null assertion on Line 49. This could be cleaner.Consider this refactor for better null safety:
-bool isVisibleOutsideTheNotifier(Element2? element) { - final annotatable = element as Annotatable?; - return element != null && - element.isPublic && - !annotatable!.metadata2.hasProtected && - !annotatable.metadata2.hasVisibleForOverriding && - !annotatable.metadata2.hasVisibleForTesting; -} +bool isVisibleOutsideTheNotifier(Element2? element) { + if (element == null || !element.isPublic) return false; + final annotatable = element as Annotatable; + return !annotatable.metadata2.hasProtected && + !annotatable.metadata2.hasVisibleForOverriding && + !annotatable.metadata2.hasVisibleForTesting; +}packages/riverpod_analyzer_utils/lib/src/nodes/manual_providers/provider.dart (1)
253-266: Null-safety around lookUpMethod3lookUpMethod3('call', element.library2!)! assumes presence of call. Given the familyType guard, this is likely safe. If we want to harden, add a null-check and bail gracefully.
- final callFn = (element.type as InterfaceType).lookUpMethod3( - 'call', - element.library2!, - )!; + final callFn = (element.type as InterfaceType).lookUpMethod3( + 'call', + element.library2!, + ); + if (callFn == null) return null;packages/internal_lint/lib/src/lints/show_all.dart (2)
88-112: Casting to Annotatable can throw; prefer a type checkexportedElements should be Annotatable in practice, but a defensive check avoids unexpected cast errors.
Apply:
- .where((e) { - final annotatable = e as Annotatable; + .where((e) { + final annotatable = e is Annotatable ? e as Annotatable : null; + if (annotatable == null) return false;
28-34: Nit: early-return duplicationYou compute exportedLibrary here and again inside _computeExportDiff. Consider passing it down to avoid re-resolution.
packages/riverpod/test/meta_test.dart (4)
24-26: No-op cast; either annotate variable or drop the castresult as ResolvedUnitResult has no effect.
Apply:
- final result = await resolveFile2(path: absolute); - result as ResolvedUnitResult; + final ResolvedUnitResult result = await resolveFile2(path: absolute);
134-137: Redundant loop re-visiting the same elementvisitClassElement calls visitElement(element) once per supertype but never uses superType; this is a no-op and wastes work.
Apply:
- for (final superType in element.allSupertypes) { - visitElement(element); - } + // No extra visitation needed; overrides are checked in _verifyInheritsAnnotations.
99-101: Improve diagnostics: include symbol name in undocumented reportCurrently only the library URI is reported.
Apply:
- undocumentedElements.add('${element.library2!.uri}'); + undocumentedElements.add('${element.library2!.uri}#${element.name3}');
146-177: Defensive cast to AnnotatableCasting every Element2 to Annotatable can throw. Guard with an is-check.
Apply:
- final annotatable = element as Annotatable; + if (element is! Annotatable) return; + final annotatable = element as Annotatable;packages/riverpod_lint_flutter_test/test/golden.dart (1)
262-264: Replace no-op cast with explicit typingAvoid the redundant runtime cast; declare the variable with the desired static type.
- final result = await resolveFile2(path: file.path); - result as ResolvedUnitResult; + final ResolvedUnitResult result = await resolveFile2(path: file.path);packages/riverpod_lint_flutter_test/test/test_lint.dart (2)
36-38: Use explicit typing instead of a separate castThis removes the unnecessary cast line and improves readability.
- final result = await resolveFile2(path: sourcePath.path); - result as ResolvedUnitResult; + final ResolvedUnitResult result = await resolveFile2(path: sourcePath.path);
79-81: Apply the same explicit typing hereMirror the earlier change for consistency.
- final result = await resolveFile2(path: absoluteSource.path); - result as ResolvedUnitResult; + final ResolvedUnitResult result = await resolveFile2(path: absoluteSource.path);packages/riverpod_analyzer_utils/lib/src/nodes/generated_providers/identifiers.dart (1)
10-13: Good: switch to PropertyAccessorElement2 and guard variable3Nice defensive null-check; flow remains unchanged. Consider renaming
variabletovariableElementfor clarity.packages/riverpod_analyzer_utils_tests/test/type_utils_test.dart (3)
131-134: Same as above: redundant cast?
If not required, drop the explicit TopLevelVariableElement2 cast.
201-205: Same as above: redundant cast?
Prefer relying on the Annotatable parameter if possible.
38-41: Remove redundant cast in parseFirstProviderFor call
In type_utils_test.dart (lines 38–39) dropas TopLevelVariableElement2—declaredFragment!.elementalready implements Annotatable.packages/riverpod_lint_flutter_test/test/encoders.dart (1)
65-68: Minor: inconsistent relativePath threading (optional fix).
_writeDiagnostic ignores the relativePath param by hardcoding Directory.current.path, and _writeDiagnosticMessage/_highlight don’t use the provided relativePath. Consider honoring the parameter to make goldens stable when run from non-repo roots.Example fix (non-diff, illustrates intent):
void _writeDiagnostic( StringBuffer buffer, Diagnostic diagnostic, { String indent = '', required String relativePath, }) { ... _writeDiagnosticMessage( buffer, diagnostic.problemMessage, indent: indent, relativePath: relativePath, // pass through ); } void _writeDiagnosticMessage( StringBuffer buffer, DiagnosticMessage error, { String indent = '', required String relativePath, }) { ... _highlight( buffer, File(error.filePath), offset: error.offset, length: error.length, indent: indent, // use the param: // relativePath applied inside _highlight ); } void _highlight( StringBuffer buffer, File file, { required int offset, required int length, String indent = '', String? relativePath, }) { ... final shownPath = relativePath == null ? p.relative(file.path) : p.relative(file.path, from: relativePath); buffer.writeln('${indent}${p.normalize(shownPath)}:${start.lineNumber}:${start.columnNumber}'); ... }packages/riverpod_analyzer_utils_tests/test/analyzer_test_utils.dart (1)
89-91: Remove unused cast and avoid dynamicInline the cast to keep
aststrongly typed and remove the no-op cast line.- final ast = await lib!.session.getResolvedLibraryByElement2(lib); - ast as ResolvedLibraryResult; + final ast = await lib!.session + .getResolvedLibraryByElement2(lib) as ResolvedLibraryResult;packages/riverpod_analyzer_utils/lib/src/nodes/generated_providers/notifier.dart (1)
160-168: Consider avoiding the null-assert onname3If
ClassElement2.name3is guaranteed non-null for classes, prefer a non-nullable type (or an assert) over!for clarity.- name: element.name3!, + // If name3 cannot be null for ClassElement2, avoid bang: + name: element.name3!,packages/riverpod_analyzer_utils/lib/src/nodes/widgets/stateful_widget.dart (2)
10-22: Guard against non-class return types to avoid a runtime cast.
type.element3.cast<ClassElement2>()may throw ifelement3is null or not aClassElement2(e.g., typedefs, invalid/malformed code). Add a safe check.- return type.element3.cast<ClassElement2>(); + final el = type.element3; + if (el is! ClassElement2) return null; + return el;
67-77: State lookup is limited to the current unit.If the
Stateclass is declared in another part/unit of the same library, this will return null. Consider extending the search across all library units.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (63)
packages/internal_lint/lib/src/lints/avoid_sub_read.dart(1 hunks)packages/internal_lint/lib/src/lints/generic_name.dart(1 hunks)packages/internal_lint/lib/src/lints/show_all.dart(13 hunks)packages/internal_lint/pubspec.yaml(1 hunks)packages/lint_visitor_generator/lib/builder.dart(2 hunks)packages/lint_visitor_generator/pubspec.yaml(1 hunks)packages/riverpod/pubspec.yaml(1 hunks)packages/riverpod/test/meta_test.dart(11 hunks)packages/riverpod_analyzer_utils/lib/src/nodes.dart(2 hunks)packages/riverpod_analyzer_utils/lib/src/nodes/annotation.dart(3 hunks)packages/riverpod_analyzer_utils/lib/src/nodes/dependencies.dart(8 hunks)packages/riverpod_analyzer_utils/lib/src/nodes/generated_providers/function.dart(3 hunks)packages/riverpod_analyzer_utils/lib/src/nodes/generated_providers/identifiers.dart(1 hunks)packages/riverpod_analyzer_utils/lib/src/nodes/generated_providers/notifier.dart(3 hunks)packages/riverpod_analyzer_utils/lib/src/nodes/generated_providers/providers.dart(1 hunks)packages/riverpod_analyzer_utils/lib/src/nodes/manual_providers/provider.dart(5 hunks)packages/riverpod_analyzer_utils/lib/src/nodes/provider_for.dart(2 hunks)packages/riverpod_analyzer_utils/lib/src/nodes/provider_or_family.dart(1 hunks)packages/riverpod_analyzer_utils/lib/src/nodes/ref_invocation.dart(1 hunks)packages/riverpod_analyzer_utils/lib/src/nodes/widget_ref_invocation.dart(1 hunks)packages/riverpod_analyzer_utils/lib/src/nodes/widgets/state.dart(5 hunks)packages/riverpod_analyzer_utils/lib/src/nodes/widgets/stateful_widget.dart(6 hunks)packages/riverpod_analyzer_utils/lib/src/nodes/widgets/stateless_widget.dart(1 hunks)packages/riverpod_analyzer_utils/lib/src/riverpod_types.dart(1 hunks)packages/riverpod_analyzer_utils/lib/src/riverpod_types/core.dart(1 hunks)packages/riverpod_analyzer_utils/pubspec.yaml(2 hunks)packages/riverpod_analyzer_utils_tests/pubspec.yaml(2 hunks)packages/riverpod_analyzer_utils_tests/test/analyzer_test_utils.dart(5 hunks)packages/riverpod_analyzer_utils_tests/test/type_utils_test.dart(4 hunks)packages/riverpod_generator/CHANGELOG.md(0 hunks)packages/riverpod_generator/lib/src/json_generator.dart(1 hunks)packages/riverpod_generator/lib/src/parse_generator.dart(3 hunks)packages/riverpod_generator/pubspec.yaml(1 hunks)packages/riverpod_generator/test/annotated_test.dart(1 hunks)packages/riverpod_generator/test/doc_test.dart(1 hunks)packages/riverpod_generator/test/error_test.dart(1 hunks)packages/riverpod_lint/CHANGELOG.md(0 hunks)packages/riverpod_lint/lib/src/assists/consumers/convert_to_stateful_base_widget.dart(7 hunks)packages/riverpod_lint/lib/src/assists/consumers/convert_to_stateless_base_widget.dart(6 hunks)packages/riverpod_lint/lib/src/assists/consumers/convert_to_widget_utils.dart(2 hunks)packages/riverpod_lint/lib/src/lints/async_value_nullable_pattern.dart(3 hunks)packages/riverpod_lint/lib/src/lints/avoid_build_context_in_providers.dart(2 hunks)packages/riverpod_lint/lib/src/lints/avoid_public_notifier_properties.dart(3 hunks)packages/riverpod_lint/lib/src/lints/avoid_ref_inside_state_dispose.dart(1 hunks)packages/riverpod_lint/lib/src/lints/functional_ref.dart(4 hunks)packages/riverpod_lint/lib/src/lints/missing_provider_scope.dart(3 hunks)packages/riverpod_lint/lib/src/lints/notifier_build.dart(3 hunks)packages/riverpod_lint/lib/src/lints/notifier_extends.dart(3 hunks)packages/riverpod_lint/lib/src/lints/only_use_keep_alive_inside_keep_alive.dart(1 hunks)packages/riverpod_lint/lib/src/lints/protected_notifier_properties.dart(1 hunks)packages/riverpod_lint/lib/src/lints/provider_dependencies.dart(2 hunks)packages/riverpod_lint/lib/src/lints/provider_parameters.dart(4 hunks)packages/riverpod_lint/lib/src/lints/riverpod_syntax_error.dart(2 hunks)packages/riverpod_lint/lib/src/lints/scoped_providers_should_specify_dependencies.dart(6 hunks)packages/riverpod_lint/lib/src/lints/unsupported_provider_value.dart(1 hunks)packages/riverpod_lint/pubspec.yaml(1 hunks)packages/riverpod_lint_flutter_test/pubspec.yaml(1 hunks)packages/riverpod_lint_flutter_test/pubspec_overrides.yaml(0 hunks)packages/riverpod_lint_flutter_test/test/encoders.dart(4 hunks)packages/riverpod_lint_flutter_test/test/golden.dart(1 hunks)packages/riverpod_lint_flutter_test/test/test_lint.dart(2 hunks)pubspec.yaml(0 hunks)website/docs/introduction/getting_started.mdx(0 hunks)
💤 Files with no reviewable changes (5)
- packages/riverpod_lint_flutter_test/pubspec_overrides.yaml
- packages/riverpod_generator/CHANGELOG.md
- website/docs/introduction/getting_started.mdx
- pubspec.yaml
- packages/riverpod_lint/CHANGELOG.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build (master, examples/random_number)
- GitHub Check: build (master, packages/flutter_riverpod)
🔇 Additional comments (104)
packages/riverpod_lint/lib/src/lints/riverpod_syntax_error.dart (3)
14-18: LGTM — migrated severity to ErrorSeverity.The
LintCodeconfig looks correct witherrorSeverity: ErrorSeverity.ERROR.
21-25: LGTM — run signature updated to ErrorReporter.Override matches the newer reporter API and import setup.
33-38: LGTM — reporter.atOffset uses errorCode and arguments correctly.
problemMessage: '{0}'aligns with a single argument.packages/riverpod_lint/lib/src/lints/avoid_build_context_in_providers.dart (2)
45-47: Helper signature alignedConsistent switch to ErrorReporter in the private helper. No further changes needed here.
24-26: Manual verification required:DiagnosticReporterremoval &runsignature consistencyConfirm no
DiagnosticReporterreferences remain and that everyvoid runmethod is declared as
run(CustomLintResolver, ErrorReporter, CustomLintContext).packages/riverpod_lint/lib/src/lints/scoped_providers_should_specify_dependencies.dart (4)
59-75: Scoped overrides check reads well.Logic is unchanged aside from the reporter type. No issues spotted.
77-85: ProviderScope handler: LGTM.Type migration only; flow remains the same.
45-57: No lingeringDiagnosticReporterorDiagnosticSeverityusages remain; migration toErrorReporteris complete.
16-21: Verifyanalyzerdev_dependency version
Ensure every package’s pubspec.yaml pinsanalyzerto at least the version that introducedElement.library2(analyzer >= 0.47.0). If any dev_dependency omits or uses an older analyzer version, bump it accordingly.packages/riverpod_lint/lib/src/lints/avoid_ref_inside_state_dispose.dart (2)
17-21: Severity enum migration looks correctUsing
errorSeverity: ErrorSeverity.WARNINGaligns with analyzer’s APIs. No issues spotted.
24-28: No remaining DiagnosticReporter or DiagnosticSeverity references; all lint rule run() methods now use ErrorReporter.packages/riverpod_lint/lib/src/lints/notifier_extends.dart (2)
64-69: Reporter migration looks good.Switch to ErrorReporter aligns with newer analyzer APIs; existing atToken/atNode helpers from custom_lint_builder still apply.
79-83: Remove the name2 guard suggestion; name2 has been available since analyzer 5.11.0. (github.com)Likely an incorrect or invalid review comment.
packages/riverpod_lint/lib/src/assists/consumers/convert_to_widget_utils.dart (2)
187-199: LGTM: migrated to writeElement2 consistently.The branches for assignment, postfix, and prefix correctly switch to
writeElement2, mirroring analyzer’s extension semantics.
182-185: Call sites already guard the new Element2? return type correctly
Both occurrences ofwriteOrReadElementcheckif (element is PropertyAccessorElement2)before use, avoiding any implicit casts to the oldElement.packages/riverpod_lint/lib/src/lints/missing_provider_scope.dart (3)
71-86: LGTM on the quick-fix application.Importing ProviderScope and wrapping the first arg is correct; priority/message look good.
27-32: Ensure consistentrunsignature
Verify that your pinned custom_lint version’srunsignature (parameter types and order:CustomLintResolver,ErrorReporter,CustomLintContext) is used uniformly across all rule classes.
58-66: Verify DartFix.run signature consistency
CustomLint recently changed therunAPI; ensure everyDartFixsubclass—includingAddProviderScope—overridesrunwith the same parameter list(CustomLintResolver resolver, ChangeReporter reporter, CustomLintContext context, AnalysisError analysisError, List<AnalysisError> others).packages/riverpod_lint/lib/src/lints/notifier_build.dart (1)
27-29: Allrunsignatures updated toErrorReporter
No instances ofDiagnosticReporterremain inrunmethods across the codebase.packages/riverpod_lint_flutter_test/pubspec.yaml (1)
29-29: Analyzer constraints allow ≥7.3.0 resolution across workspace
Verified that only riverpod_analyzer_utils declares analyzer: ^7.3.0 and all other ^7.0.0 pins permit versions ≥7.3.0 — a workspacepub getwill intersect constraints to ≥7.3.0 <8.0.0. No changes required.packages/riverpod_lint/pubspec.yaml (1)
22-22: Downgrade to analyzer ^7 — LGTM.Matches the repo-wide revert and should keep tests/lints green.
packages/riverpod_analyzer_utils/pubspec.yaml (1)
15-15: Use analyzer ^7.3.0 and build ^3.0.0 — LGTM.Having ^7.3.0 here is fine to drive the workspace to a compatible analyzer while others stay at ^7.0.0.
Also applies to: 26-26
packages/riverpod_generator/test/annotated_test.dart (1)
10-10: Prefer explicit typing over castFile packages/riverpod_generator/test/annotated_test.dart:10
Minor readability: type the variable instead of using an inline cast.-final result = await resolveFile2(path: file.path) as ResolvedUnitResult; +final ResolvedUnitResult result = await resolveFile2(path: file.path);Manually verify there are no remaining calls to the old
resolveFileAPI anywhere in the codebase.packages/riverpod_analyzer_utils_tests/pubspec.yaml (1)
11-11: Align tests to analyzer ^7 / build ^3 — LGTM.Consistent with the revert; should resolve cleanly with workspace resolution.
Also applies to: 21-21
packages/riverpod/pubspec.yaml (1)
31-31: Dev analyzer ^7 — LGTM.Matches the revert and keeps SDK tooling consistent.
packages/internal_lint/pubspec.yaml (2)
11-11: Verify analyzer_plugin compatibility with analyzer ^7.x.analyzer_plugin: ^0.13.0 may have a supported analyzer range. Please confirm it’s compatible with the chosen analyzer lower bound (and bump if needed) to prevent resolution conflicts.
10-10: Manual verify analyzer 7.x lower bound
Dart tooling isn’t available in this environment—please check the analyzer changelog or pub.dev version history to identify the first 7.x release that adds Element2/MixinElement2 and DartType.element3, and bump the lower bound (e.g. to ^7.3.0) if 7.0.0 doesn’t include them.packages/riverpod_generator/pubspec.yaml (1)
21-21: Verify analyzer version & align dev dependencies
- Confirm analyzer ^7.0.0 supports all Element2/Element3 APIs or bump to ^7.3.0
- Upgrade riverpod_annotation to 3.0.0-dev.18 to match the generator’s version
- Run build_runner with build ^3.0.0 and source_gen ^3.0.0 to ensure everything compiles without errors
packages/lint_visitor_generator/pubspec.yaml (1)
10-11: Please manually verify workspace compatibility after analyzer/build version changes.Run
dart pub upgrade --dry-runin each package (e.g., under packages/lint_visitor_generator) to ensure no transitive solver conflicts.packages/riverpod_generator/lib/src/json_generator.dart (1)
53-54: firstOrNull supported in Dart ≥3.0.0; min SDK is ^3.8.0 Iterable.firstOrNull has been part of the core SDK since Dart 3.0.0 and your package’s SDK constraint is ^3.8.0, so no extra import or fallback is needed. (stackoverflow.com, api.dart.dev)packages/riverpod_lint/lib/src/lints/unsupported_provider_value.dart (1)
31-31: LGTM: migrated run signature to ErrorReporter.Consistent with the analyzer revert. No functional changes in the rule behavior.
packages/riverpod_lint/lib/src/lints/protected_notifier_properties.dart (1)
20-20: LGTM: ErrorReporter migration.Signature change matches the rest of the custom_lint rules; reporter usage is unchanged.
packages/internal_lint/lib/src/lints/generic_name.dart (1)
18-18: LGTM: ErrorReporter migration.Consistent with the analyzer revert; behavior preserved.
packages/lint_visitor_generator/lib/builder.dart (1)
22-22: LGTM: library name check moved to name3.Matches analyzer surface used elsewhere in the PR.
packages/riverpod_lint/lib/src/lints/only_use_keep_alive_inside_keep_alive.dart (1)
23-23: Migration to ErrorSeverity/ErrorReporter looks correct.Severity and reporter type align with analyzer’s newer API; call-site usage via
reporter.atNoderemains valid.Also applies to: 29-31
packages/internal_lint/lib/src/lints/avoid_sub_read.dart (1)
15-16: Good API migration to ErrorSeverity/ErrorReporter.Also applies to: 21-23
packages/riverpod_generator/lib/src/parse_generator.dart (1)
18-27: No transitive API compatibility issues detected – all packages depend onanalyzer ^7.x(includingriverpod_analyzer_utilsat ^7.3.0) andsource_gen ^3.x, soElement2is consistently available across callers.packages/riverpod_lint/lib/src/lints/async_value_nullable_pattern.dart (1)
22-23: API updates (ErrorSeverity/ErrorReporter + element3/library2) look consistent.Also applies to: 28-30, 66-68, 89-91
packages/riverpod_lint/lib/src/lints/avoid_public_notifier_properties.dart (4)
2-2: LGTM! Correct migration to analyzer v2 API.The import change from
element.darttoelement2.dartaligns with the analyzer v2 migration pattern.
22-22: LGTM! Correct reporter type update.The change from
DiagnosticReportertoErrorReporteris consistent with the analyzer v2 API migration.
41-41: LGTM! Correct migration to metadata2 API.The change from
metadata.hasOverridetometadata2.hasOverrideis consistent with the analyzer v2 migration.
35-38: Ensure alldeclaredFragment?.elementinstances implementAnnotatable
Casting toAnnotatable?is required for metadata access, but please manually verify that every possible element type returned here (fields, getters, methods, etc.) implements theAnnotatableinterface.packages/riverpod_lint/lib/src/assists/consumers/convert_to_stateful_base_widget.dart (5)
4-4: LGTM! Correct migration to analyzer v2 API.The import change from
element.darttoelement2.dartaligns with the analyzer v2 migration.
90-90: LGTM! Consistent migration to Element2 types.All element type updates (Element2, FieldElement2, getter2, setter2) are correctly migrated to the v2 API.
Also applies to: 102-106, 108-116
237-237: LGTM! Correct migration of FieldFinder to v2 types.The FieldFinder class correctly uses
FieldElement2,FieldFormalParameterElement2, andfield2property.Also applies to: 242-244
256-256: LGTM! Consistent use of v2 property accessor types.The code correctly uses
PropertyAccessorElement2andvariable3to access the field.Also applies to: 262-264
279-280: LGTM! Correct migration of ReplacementEditBuilder.The class correctly uses
ClassElement2,Set<Element2>,ExecutableElement2, andenclosingElement2.Also applies to: 289-290
packages/riverpod_lint/lib/src/lints/provider_dependencies.dart (3)
200-200: LGTM! Correct migration to ErrorSeverity.The change from
DiagnosticSeverity.WARNINGtoErrorSeverity.WARNINGis consistent with the analyzer v2 API.
206-206: LGTM! Correct reporter type update.The change from
DiagnosticReportertoErrorReporteraligns with the analyzer v2 API migration.
306-307: LGTM! Correct migration to AnalysisError.The parameter type changes from
DiagnostictoAnalysisErrorandList<Diagnostic>toList<AnalysisError>are consistent with the analyzer v2 API.packages/riverpod_lint/lib/src/assists/consumers/convert_to_stateless_base_widget.dart (2)
313-326: LGTM: ExecutableElement2/enclosingElement2 checksThe Element2 migration here is consistent and keeps the original intent of stripping qualifiers when referencing widget members.
175-191: Verify analyzer version constraint
Ensure your package’s pubspec.yaml pins the analyzer to a range (e.g.>=6.7.0 <8.0.0) that exposesFieldElement2.getter2/setter2andVariableDeclaration.declaredElement2.packages/riverpod_analyzer_utils/lib/src/nodes/manual_providers/provider.dart (1)
65-70: Remove the verification TODO—.constructorName.type.name2is correct on analyzer 7.xpackages/riverpod_lint/lib/src/lints/functional_ref.dart (4)
17-22: Severity migration looks correctSwitch to ErrorSeverity.WARNING aligns with ErrorReporter usage.
25-30: Reporter type migration to ErrorReporterSignature change is consistent with analyzer v2+. No issues spotted.
67-74: Fix runner types to AnalysisError: OKAnalysisError/others migration matches the new reporting flow.
1-9: No changes needed.LintCodeis re-exported bypackage:custom_lint_builder/custom_lint_builder.dart, so hiding it fromanalyzer/error/error.dartis safe and the code will compile. (pub.dev)packages/riverpod_lint/lib/src/lints/provider_parameters.dart (4)
2-2: Analyzer v2 migration bits look goodImports, LintCode severity, and run signature updates are consistent.
Also applies to: 23-24, 29-31
70-76: Redirect-chain helper LGTMapplyRedirectedConstructors() is correct and tail-recursive.
78-94: Method lookup helper LGTMrecursiveGetMethod correctly walks supertypes via getMethod2 and skips Object.
54-61: UsestaticElementinstead of deprecatedelementonConstructorName
ConstructorName.elementis deprecated and may be removed; useConstructorName.staticElementto access the resolved constructor element.--- a/packages/riverpod_lint/lib/src/lints/provider_parameters.dart +++ b/packages/riverpod_lint/lib/src/lints/provider_parameters.dart @@ -54,2 +54,2 @@ - final instantiatedObject = value.constructorName.element - ?.applyRedirectedConstructors(); + final instantiatedObject = value.constructorName.staticElement + ?.applyRedirectedConstructors();Likely an incorrect or invalid review comment.
packages/internal_lint/lib/src/lints/show_all.dart (1)
2-2: Analyzer v2 migration reads wellElement2/ErrorReporter/AnalysisError and name3/metadata2 usage look consistent.
Also applies to: 18-19, 24-26, 68-74, 77-80, 121-122, 131-131, 138-139, 275-296, 346-352
packages/riverpod/test/meta_test.dart (1)
3-3: Analyzer v2 test migration LGTMLibraryElement2/visitor2/definedNames2/accept2 usage is coherent.
Also applies to: 17-17, 24-25, 27-35
packages/riverpod_analyzer_utils/lib/src/riverpod_types.dart (1)
1-1: Import migration to element2 looks correctImport aligns with v2 element APIs; no functional impact here.
packages/riverpod_analyzer_utils/lib/src/nodes.dart (1)
12-12: Confirm v2 API symbols (element2/name3) across analyzer versionsUsing alias.element2.name3 and isExactly(alias.element2) looks right for v2. Please confirm the minimum analyzer constraint in pubspecs matches this usage and CI spans the supported range.
Also applies to: 59-61
packages/riverpod_analyzer_utils/lib/src/nodes/ref_invocation.dart (1)
17-19: MethodElement2/enclosingElement2 migration looks goodSafe null-aware cast via your
cast<T>()helper; owner checks remain intact.packages/riverpod_analyzer_utils/lib/src/nodes/generated_providers/providers.dart (1)
10-12: Potential breaking change: ProviderDeclarationElement.element → Element2If this type is exposed outside the package, this is source-breaking. Ensure:
- pubspec version is bumped appropriately (semver)
- CHANGELOG documents the migration
- Dependents in this mono-repo are updated
If external consumers exist, consider a transitional API or deprecation window.
packages/riverpod_analyzer_utils/lib/src/nodes/widgets/stateless_widget.dart (1)
28-29: ClassElement2 migration is consistentCache usage and behavior unchanged; looks good.
packages/riverpod_analyzer_utils_tests/test/type_utils_test.dart (1)
7-7: Import migration to element2 looks good.
Matches the v2 API used elsewhere in the PR.packages/riverpod_analyzer_utils/lib/src/nodes/widget_ref_invocation.dart (1)
20-24: Migration to MethodElement2/enclosingElement2: sanity-check element access.
Using function.element then casting to MethodElement2 relies on the element getter returning a compatible type. If available, prefer the API that directly exposes the v2 element to avoid casts.Would you like me to switch this to the most direct v2 accessor (e.g., staticElement + cast) across the codebase?
packages/riverpod_analyzer_utils/lib/src/nodes/annotation.dart (3)
15-19: Element2/ExecutableElement2 migration here is consistent.
The null checks and returnType guards look correct.
105-109: Good: using element2.cast() for returnType.
Keeps constant-eval workflow intact.
142-147: All_ofcallsites correctly pass anAnnotatableand legacymetadatausage has been removed.packages/riverpod_analyzer_utils/lib/src/nodes/provider_for.dart (1)
8-11: Correct: use element2/ExecutableElement2 for @ProviderFor detection.
Return-type gate remains unchanged.packages/riverpod_analyzer_utils/lib/src/nodes/generated_providers/function.dart (4)
64-67: ExecutableElement2 parameter: good.
Parsing now aligns with v2 surfaces.
96-99: typeParameters2 for family detection looks right.
Matches the v2 API.
104-106: Field element -> ExecutableElement2: OK.
No further concerns.
79-83: Guardelement.name3before force-unwrapping.element.name3!may be null for synthetic or unnamed elements—add a null check or fallback value to avoid runtime errors.packages/riverpod_lint_flutter_test/test/encoders.dart (4)
4-6: Switch to AnalysisError is appropriate.
Keeping diagnostic.dart for message types is correct.
33-35: Golden helper now encodes AnalysisError: LGTM.
Type alignment with analyzer v2 error model looks good.
46-49: _encodeAnalysisErrors signature updated: OK.
No functional changes otherwise.
71-72: errorCode.name: correct for AnalysisError.
No issues.packages/riverpod_analyzer_utils/lib/src/nodes/dependencies.dart (8)
31-50: ExecutableElement2 branch: good migration.
Functional dependencies now parsed via v2 elements; error path remains explicit.
52-70: ClassElement2 branch: good migration.
Class-based dependencies use v2 elements consistently.
132-140: toFunctionValue2 adoption: good.
Covers function references in @Dependencies lists.
145-151: Guard element3! nullability.
element3 can be null for non-interface types; while constants here should be class types, adding a null-check avoids brittle crashes.Would you like a small guard + errorReporter path here?
352-360: Identifier branch: Annotatable filter is fine.
Ensures we only process annotatable elements.
379-386: NamedType branch: element3 as Annotatable: OK.
Consistent with v2 type model.
463-466: DependenciesAnnotationElement: element2/ExecutableElement2 migration is correct.
ReturnType gate preserved.
481-486: No legacymetadata(v1) usages remain in packages/riverpod_analyzer_utils.packages/riverpod_analyzer_utils_tests/test/analyzer_test_utils.dart (3)
8-8: LGTM: analyzer Element2 importImporting element2.dart aligns with the updated API usage across this file.
250-257: LGTM: errors migrationSwitching from diagnostics → errors and filtering by
Severity.errormatches the newer analyzer results API.
297-305: Return type update to LibraryElement2 looks correctThe resolver helper now returning
LibraryElement2matches upstream API changes.packages/riverpod_analyzer_utils/lib/src/nodes/generated_providers/notifier.dart (3)
128-137: LGTM: migrate to ClassElement2/methods2/name3Using
ClassElement2,methods2, andname3correctly targets the new analyzer surface for locating thebuildmethod.
176-176: LGTM: family detection with typeParameters2
isFamilycheck againsttypeParameters2mirrors the previous behavior with the new API.
180-185: LGTM: element/buildMethod types migratedFields updated to
ClassElement2/ExecutableElement2are consistent with the refactor.packages/riverpod_analyzer_utils/lib/src/nodes/widgets/state.dart (4)
3-17: LGTM: migrate to ClassElement2 and element3.castUpdated signatures and
type.element3.cast<ClassElement2>()look correct for resolving the widget type.
48-49: LGTM: name3 accessUsing
widget?.element.name3aligns with analyzer v2 element naming.
66-77: LGTM: parser signature to ClassElement2State element parsing now consumes
ClassElement2; consistent with nearby code.
79-81: LGTM: field type migration
final ClassElement2 element;matches the new element model.packages/riverpod_analyzer_utils/lib/src/nodes/widgets/stateful_widget.dart (4)
24-33: LGTM on migration tolibrary2.classes.Loop and matching logic are preserved and clear.
35-37: LGTM.Keeps previous resolution order; concise and readable.
88-91: All_parseinvocations now pass aClassElement2and anAstNodeas required.
102-105: Element type check is incorrect—no baseelementmember
WidgetDeclarationElementdeclares onlydependencies, so thefinal ClassElement2 elementinStatefulWidgetDeclarationElementis a new field, not an override or type mismatch.Likely an incorrect or invalid review comment.
| final exportedLibrary = export.libraryExport!.exportedLibrary2; | ||
| final exportedPackageName = exportedLibrary?.packageName; | ||
| if (exportedPackageName == null) { | ||
| return null; | ||
| } | ||
|
|
||
| final exportedIdentifiers = exportedLibrary!.exportedElements |
There was a problem hiding this comment.
Nullability guard for export resolution to avoid crashes
_computeExportDiff() assumes export.libraryExport is non-null. In fix mode, this can be null and crash.
Apply:
- final exportedLibrary = export.libraryExport!.exportedLibrary2;
- final exportedPackageName = exportedLibrary?.packageName;
- if (exportedPackageName == null) {
- return null;
- }
+ final libraryExport = export.libraryExport;
+ final exportedLibrary = libraryExport?.exportedLibrary2;
+ final exportedPackageName = exportedLibrary?.packageName;
+ if (exportedPackageName == null) {
+ return null;
+ }📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| final exportedLibrary = export.libraryExport!.exportedLibrary2; | |
| final exportedPackageName = exportedLibrary?.packageName; | |
| if (exportedPackageName == null) { | |
| return null; | |
| } | |
| final exportedIdentifiers = exportedLibrary!.exportedElements | |
| // Before: assumed export.libraryExport! was non-null | |
| - final exportedLibrary = export.libraryExport!.exportedLibrary2; | |
| - final exportedPackageName = exportedLibrary?.packageName; | |
| - if (exportedPackageName == null) { | |
| - return null; | |
| - } | |
| // Null-safety guard: libraryExport may be null in fix mode | |
| final libraryExport = export.libraryExport; | |
| final exportedLibrary = libraryExport?.exportedLibrary2; | |
| final exportedPackageName = exportedLibrary?.packageName; | |
| if (exportedPackageName == null) { | |
| return null; | |
| } | |
| final exportedIdentifiers = exportedLibrary!.exportedElements | |
| // …rest of logic… |
🤖 Prompt for AI Agents
In packages/internal_lint/lib/src/lints/show_all.dart around lines 82 to 88, the
code assumes export.libraryExport is non-null and immediately dereferences it
(export.libraryExport!.exportedLibrary2), which can be null in fix mode and
cause a crash; update the code to null-check export.libraryExport before using
it (e.g., if export.libraryExport == null return null or continue) and only
access exportedLibrary/exportedElements when exportedLibrary is non-null,
avoiding force-unwrapping and ensuring early-return/skip when the export
resolution is absent.
| final exportedPackageName = | ||
| export.libraryExport!.exportedLibrary!.packageName; | ||
| export.libraryExport!.exportedLibrary2!.packageName; | ||
| return [ | ||
| if (exportedPackageName != null) | ||
| _Public(library: exportedPackageName, packageName: exportedPackageName), | ||
| ]; | ||
| } |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Make defaultOf resilient to null exportedLibrary
Avoid forced unwraps; this can be null on partially resolved units.
Apply:
- final exportedPackageName =
- export.libraryExport!.exportedLibrary2!.packageName;
+ final exportedPackageName =
+ export.libraryExport?.exportedLibrary2?.packageName;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| final exportedPackageName = | |
| export.libraryExport!.exportedLibrary!.packageName; | |
| export.libraryExport!.exportedLibrary2!.packageName; | |
| return [ | |
| if (exportedPackageName != null) | |
| _Public(library: exportedPackageName, packageName: exportedPackageName), | |
| ]; | |
| } | |
| final exportedPackageName = | |
| export.libraryExport?.exportedLibrary2?.packageName; | |
| return [ | |
| if (exportedPackageName != null) | |
| _Public(library: exportedPackageName, packageName: exportedPackageName), | |
| ]; | |
| } |
🤖 Prompt for AI Agents
In packages/internal_lint/lib/src/lints/show_all.dart around lines 337 to 343,
the code force-unwraps export.libraryExport!.exportedLibrary2! which can be null
for partially resolved units; change to safe navigation and null checks: read
the package name via nullable access (e.g.
export.libraryExport?.exportedLibrary2?.packageName), check for null before
constructing the _Public entry, and return an empty list when the exported
library or packageName is null so no forced unwraps remain.
| @@ -1,5 +1,5 @@ | |||
| import 'package:analyzer/dart/ast/ast.dart'; | |||
| import 'package:analyzer/dart/element/element.dart'; | |||
| import 'package:analyzer/dart/element/element2.dart'; | |||
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Verify analyzer SDK constraints match element2 APIs.
element2.dart and writeElement2 require newer analyzer APIs. Ensure all packages in the repo pin a compatible analyzer range and, given the PR’s “revert analyzer 8” intent, consider an upper bound to avoid analyzer 8 until fully supported.
Run to confirm constraints across packages:
Optionally verify API availability from public docs:
🏁 Script executed:
#!/bin/bash
# Show analyzer constraints and Dart SDK ranges in all pubspecs
fd -a pubspec.yaml | while read f; do
echo "---- $f"
rg -nP '^\s*(environment:|sdk:|dependencies:|dev_dependencies:)' -n "$f" -n
rg -nP '^\s*analyzer\s*:\s*["'\''][^"'\'']+["'\'']|^\s*analyzer\s*:\s*[^\s]+' -n "$f"
doneLength of output: 4369
🌐 Web query:
Which package:analyzer versions provide element2.dart and AssignmentExpression.writeElement2? What is the minimal version that includes both?
💡 Result:
- The element2 API (package:analyzer/dart/element/element2 — i.e., element2.dart) was introduced with the analyzer 7.1.0 release. [1]
- AssignmentExpression.writeElement2 is part of the analyzer AST API (present in current docs) and is available in the analyzer releases that include the element2 API. [2]
Minimal analyzer version that includes both: 7.1.0. [1][2]
Sources:
- analyzer changelog (7.1.0: "New APIs for element model with fragments"). [pub.dev changelog]. [3]
- AssignmentExpression API (shows writeElement2 property) — analyzer API docs. [pub.dev documentation]. [2]
Require analyzer ≥7.1.0 (<8.0.0) to support element2 API
element2.dart and AssignmentExpression.writeElement2 were added in analyzer 7.1.0. Update every pubspec currently pinning analyzer: ^7.0.0 to analyzer: ^7.1.0 (caret syntax still prevents 8.0.0) in:
- packages/internal_lint/pubspec.yaml
- packages/lint_visitor_generator/pubspec.yaml
- packages/riverpod/pubspec.yaml
- packages/riverpod_analyzer_utils_tests/pubspec.yaml
- packages/riverpod_generator/pubspec.yaml
- packages/riverpod_lint/pubspec.yaml
- packages/riverpod_lint_flutter_test/pubspec.yaml
🤖 Prompt for AI Agents
packages/riverpod_lint/lib/src/assists/consumers/convert_to_widget_utils.dart
around line 2: the code imports element2 which requires analyzer >=7.1.0; update
the analyzer SDK constraint in each listed package's pubspec.yaml
(packages/internal_lint, packages/lint_visitor_generator, packages/riverpod,
packages/riverpod_analyzer_utils_tests, packages/riverpod_generator,
packages/riverpod_lint, packages/riverpod_lint_flutter_test) from analyzer:
^7.0.0 to analyzer: ^7.1.0 (caret keeps <8.0.0), then run pub get (and update
lockfiles) so the newer analyzer with element2 APIs is used.
| extension LibraryForNode on AstNode { | ||
| LibraryElement get library => (root as CompilationUnit).library; | ||
| LibraryElement2 get library => (root as CompilationUnit).library; | ||
| } |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Confirm LibraryElement2 exposure via CompilationUnit.library
Ensure CompilationUnit.library returns LibraryElement2 under the targeted analyzer range.
🌐 Web query:
In analyzer v7.x, does (CompilationUnit).library return LibraryElement2?
💡 Result:
Short answer: No.
Details: in analyzer 7.x the AST/old element APIs still expose LibraryElement (the original element model). The element2 API is provided separately (e.g. ResolvedUnitResult/unitResult.libraryElement2 or explicit LibraryElement2-returning APIs). See the SDK diffs that add libraryElement2 and the analyzer changelog describing the element2 migration. [1][2]
Sources:
- SDK diff showing libraryElement2/getters and element2 imports. [1]
- analyzer changelog (7.x series notes about element2-related deprecations and API migration). [2]
Use correct element2 API to obtain LibraryElement2
CompilationUnit.library returns the legacy LibraryElement in analyzer 7.x; replace its usage with ResolvedUnitResult.libraryElement2 (or the dedicated element2 getter) to access LibraryElement2.
🤖 Prompt for AI Agents
In packages/riverpod_lint/lib/src/lints/functional_ref.dart around lines 134 to
136, the extension currently uses (root as CompilationUnit).library which
returns the legacy LibraryElement; change it to obtain a LibraryElement2 instead
by using the element2 API — either access the compilation unit's declaredElement
and then its libraryElement2 (e.g. (root as
CompilationUnit).declaredElement?.libraryElement2) or refactor call sites to
pass a ResolvedUnitResult and use resolvedUnitResult.libraryElement2; update the
getter to return that LibraryElement2 and handle the nullability accordingly.
| import 'package:analyzer/dart/ast/ast.dart'; | ||
| import 'package:analyzer/dart/element/element.dart'; | ||
| import 'package:analyzer/diagnostic/diagnostic.dart'; | ||
| import 'package:analyzer/dart/element/element2.dart'; |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Drop Element2 dependency and redundant type-check (broadens analyzer compatibility).
ExecutableElement2 isn’t used downstream; the guard is unnecessary and ties the rule to newer analyzer APIs. Remove the import and the whole guard block.
-import 'package:analyzer/dart/element/element2.dart';
@@
- final function = node.function;
- if (function is! SimpleIdentifier) return;
- final functionElement = function.element;
- if (functionElement is! ExecutableElement2) return;Optionally verify there are no other Element2 usages:
Also applies to: 35-39
🏁 Script executed:
#!/bin/bash
rg -n 'element2\.dart|ExecutableElement2' --type dartLength of output: 3340
Drop Element2 import and redundant type‐check in missing_provider_scope.dart
Verified this file only imports element2.dart at line 2 and uses ExecutableElement2 once at line 38—remove both.
packages/riverpod_lint/lib/src/lints/missing_provider_scope.dart
@@ -2,7 +2,6 @@
-import 'package:analyzer/dart/element/element2.dart';
import 'package:analyzer/dart/element/element.dart';
import 'package:riverpod_lint/src/riverpod_rule.dart';
import 'package:riverpod_lint/src/utils.dart';
@@ -35,7 +34,6 @@
final function = node.function;
if (function is! SimpleIdentifier) return;
final functionElement = function.element;
- if (functionElement is! ExecutableElement2) return;
final invoked = functionElement.type.returnType;
if (!isProviderType(invoked)) return;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| import 'package:analyzer/dart/element/element2.dart'; | |
| // File: packages/riverpod_lint/lib/src/lints/missing_provider_scope.dart | |
| import 'package:analyzer/dart/element/element.dart'; | |
| import 'package:riverpod_lint/src/riverpod_rule.dart'; | |
| import 'package:riverpod_lint/src/utils.dart'; | |
| /// … | |
| void visitInvocationExpression(InvocationExpression node) { | |
| final function = node.function; | |
| if (function is! SimpleIdentifier) return; | |
| final functionElement = function.element; | |
| final invoked = functionElement.type.returnType; | |
| if (!isProviderType(invoked)) return; | |
| // rest of the lint logic… | |
| } |
🤖 Prompt for AI Agents
In packages/riverpod_lint/lib/src/lints/missing_provider_scope.dart around line
2, remove the unused import of 'package:analyzer/dart/element/element2.dart' and
replace any usage of ExecutableElement2 (the single occurrence at ~line 38) with
the standard ExecutableElement type; adjust the type check and any static type
annotations accordingly so the code relies on the analyzer's element.dart API
(no element2 import needed).
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
website/docs/migration/0.14.0_to_1.0.0.mdx (1)
58-61: Doc example bug: parameter type should be WidgetRef, not Widget.
Earlier you consistently useWidgetRefelsewhere; this snippet should match.-Widget build(BuildContext context, Widget ref) { +Widget build(BuildContext context, WidgetRef ref) {website/i18n/ru/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx (1)
190-191: Update FR translation FutureProvider URL to hooks_riverpod 3.0.0-dev.18
FR locale at website/i18n/fr/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx:188 uses
https://pub.dev/documentation/riverpod/latest/riverpod/FutureProvider-class.html, but RU and other locales reference
https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/FutureProvider-class.html; align FR to the same URL.
🧹 Nitpick comments (18)
website/docs/from_provider/motivation/motivation.mdx (1)
187-187: Uselatestin thekeepAliveURL to avoid link rot.-[keepAlive]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Ref/keepAlive.html +[keepAlive]: https://pub.dev/documentation/hooks_riverpod/latest/hooks_riverpod/Ref/keepAlive.htmlwebsite/i18n/bn/docusaurus-plugin-content-docs/current/concepts/providers.mdx (1)
176-178: Prerelease links verified (HTTP 200). Suggest swapping3.0.0-dev.18tolatestfor long-term stability and to avoid future churn.website/i18n/ja/docusaurus-plugin-content-docs/current/from_provider/provider_vs_riverpod.mdx (1)
407-407: Confirm target: “AsyncNotifiers” label points to Notifier-class.If the intent is to document AsyncNotifier specifically, consider linking to AsyncNotifier-class instead. Otherwise, keep as-is.
Proposed tweak:
-[AsyncNotifiers]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Notifier-class.html +[AsyncNotifiers]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/AsyncNotifier-class.htmlRefs for both targets:
website/i18n/ru/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx (1)
190-191: Prefer version-agnostic pub.dev URL to reduce churn.Using "latest" avoids repeated edits with each dev bump and reduces risk of stale links.
-[futureprovider]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/FutureProvider-class.html +[futureprovider]: https://pub.dev/documentation/hooks_riverpod/latest/hooks_riverpod/FutureProvider-class.htmlOptionally, link to the source package docs (often more canonical for types defined in riverpod):
-[futureprovider]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/FutureProvider-class.html +[futureprovider]: https://pub.dev/documentation/riverpod/latest/riverpod/FutureProvider-class.htmlwebsite/i18n/ru/docusaurus-plugin-content-docs/current/concepts/combining_providers.mdx (1)
270-273: Dev.18 links resolve correctly — LGTMAll four updated references point to valid 3.0.0-dev.18 docs (with StateProvider/StateNotifierProvider under legacy), so the change is good to ship. (pub.dev)
If you intend to pin to a specific pre-release consistently, consider aligning other hooks_riverpod references on this page to the same version to reduce future drift.
website/i18n/it/docusaurus-plugin-content-docs/current/concepts/combining_providers.mdx (1)
231-235: Dev.18 doc links return 200; optional version centralization
All five hooks_riverpod 3.0.0-dev.18 URLs respond with HTTP 200. You may still extract the version into a shared constant or switch to the stable “latest” alias to reduce future churn.website/docs/concepts2/containers.mdx (2)
39-43: Optional: clarify test-only usage of ProviderContainer.test.Consider adding one sentence noting it relies on package:test’s addTearDown and is intended for tests only. Example addition after Line 41. (pub.dev)
Inside tests, do not use [ProviderContainer] directly. Use [ProviderContainer.test](https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/ProviderContainer/ProviderContainer.test.html) instead. +This factory is test-only and auto-disposes via package:test’s addTearDown.
147-147: Nit: consider linking ProviderContainer to core package docs.Since the pure‑Dart examples import package:riverpod, you could point [ProviderContainer] to riverpod’s API docs for consistency. Current links are fine because hooks_riverpod re‑exports the type. (pub.dev)
packages/riverpod_lint_flutter_test/analysis_options.yaml (1)
10-13: Limit and track the temporary deprecation suppressionOK to unblock mixed analyzer 7/8, but keep the blast radius minimal and track removal.
- Since this file is already package-scoped, good. Consider also suppressing
deprecated_member_use_from_same_packageif you hit noise during local development.- Please open a tracking issue and add its ID in the comment to ensure the suppression gets removed once 8.x is required.
I can open a tracking issue and a CI check that fails once analyzer ≥8 is enforced without this rule—want me to draft that?
analysis_options.yaml (1)
20-22: Global suppression may mask useful deprecation signalsAdding
deprecated_member_use: ignoreat the root silences deprecations across all packages. Consider:
- Keeping the suppression only in packages that must straddle analyzer 7/8, or
- Downgrading to
infohere and usingignorein the few packages that truly need it.If you keep it global, also consider adding
deprecated_member_use_from_same_package: ignoreto avoid churn from self-references.I can submit a follow-up PR that scopes/tiers the suppression and adds a lint-baseline reminder tied to the analyzer 8-only switch.
website/docs/concepts2/refs.mdx (1)
392-405: De-dup future churn by centralizing the docs version.To avoid editing many files for the next dev bump, consider a small MDX helper or site constant (e.g., DOCS_VER) and interpolate it into these anchors site-wide.
I can draft a tiny MDX component like
<ApiLink path="hooks_riverpod/Ref-class.html" />that prependshttps://pub.dev/documentation/hooks_riverpod/${DOCS_VER}/. Want me to open a follow-up PR?packages/riverpod/lib/src/core/async_value.dart (1)
351-359: TightenDataFilledRecord.sourceto non‐nullable
AsyncValueInternals.valueFilledalways provides a non-nullsource(defaults toDataSource.liveOrRefreshorDataSource.reload), so change the typedef toDataSourceand update its doc comment with those invariants. No call sites treatsourceas nullable.website/i18n/ko/docusaurus-plugin-content-docs/current/from_provider/quickstart.mdx (1)
192-192: Update Notifier link to core Riverpod docs
Versioned 3.0.0-dev.18 docs aren’t available on pub.dev; replace the hooks_riverpod URL with the core Riverpod API reference:In website/i18n/ko/docusaurus-plugin-content-docs/current/from_provider/quickstart.mdx:192
-[Riverpod의 provider들]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Notifier-class.html +[Riverpod의 provider들]: https://pub.dev/documentation/riverpod/latest/riverpod/Notifier-class.htmlwebsite/docs/concepts2/retry.mdx (5)
31-35: Fix misleading comment in the retry exampleComment says “Stop retrying on ProviderException” but the next line stops after 5 attempts. Update the comment for clarity.
- // Stop retrying on ProviderException + // Stop after 5 attempts if (retryCount >= 5) return null; // Ignore ProviderException if (error is ProviderException) return null;
83-84: Typo: “retuning” → “returning”-Disabling retry is as simple as always retuning `null` in the retry function. +Disabling retry is as simple as always returning `null` in the retry function.
98-100: Grammar: remove duplicated “more”-The default retry logic is designed to be a more more clever than a naive "if fail, retry". +The default retry logic is designed to be more clever than a naive "if fail, retry".
141-145: Grammar: “await for” → “await”-You may be aware that you can await for asynchronous providers to complete, by using [FutureProvider.future]: +You may be aware that you can await asynchronous providers to complete, by using [FutureProvider.future]:
51-57: Raw snippet appears inconsistent/unbalancedThe raw snippet starts a FutureProvider but then declares a different Provider and never closes the brace. Suggest correcting for consistency and balance.
- raw={`final myProvider = FutureProvider<int>((ref) async { - final provider = Provider<int>( - // highlight-next-line - retry: myRetry, - (ref) => 0, - ); + raw={`final myProvider = Provider<int>( + // highlight-next-line + retry: myRetry, + (ref) => 0, +);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (107)
analysis_options.yaml(1 hunks)examples/first_app/pubspec.yaml(1 hunks)packages/internal_lint/pubspec.yaml(1 hunks)packages/lint_visitor_generator/pubspec.yaml(1 hunks)packages/riverpod/lib/src/core/async_value.dart(1 hunks)packages/riverpod/pubspec.yaml(1 hunks)packages/riverpod_analyzer_utils/pubspec.yaml(2 hunks)packages/riverpod_analyzer_utils_tests/pubspec.yaml(2 hunks)packages/riverpod_generator/pubspec.yaml(2 hunks)packages/riverpod_lint/pubspec.yaml(1 hunks)packages/riverpod_lint_flutter_test/analysis_options.yaml(1 hunks)packages/riverpod_lint_flutter_test/pubspec.yaml(1 hunks)pubspec.yaml(1 hunks)website/docs/concepts2/auto_dispose.mdx(1 hunks)website/docs/concepts2/consumers.mdx(1 hunks)website/docs/concepts2/containers.mdx(2 hunks)website/docs/concepts2/mutations.mdx(1 hunks)website/docs/concepts2/observers.mdx(1 hunks)website/docs/concepts2/offline.mdx(1 hunks)website/docs/concepts2/overrides.mdx(1 hunks)website/docs/concepts2/providers.mdx(1 hunks)website/docs/concepts2/refs.mdx(1 hunks)website/docs/concepts2/retry.mdx(1 hunks)website/docs/from_provider/motivation/motivation.mdx(1 hunks)website/docs/from_provider/provider_vs_riverpod.mdx(1 hunks)website/docs/from_provider/quickstart.mdx(1 hunks)website/docs/migration/0.13.0_to_0.14.0.mdx(1 hunks)website/docs/migration/0.14.0_to_1.0.0.mdx(1 hunks)website/docs/whats_new.mdx(1 hunks)website/i18n/bn/docusaurus-plugin-content-docs/current/concepts/combining_providers.mdx(1 hunks)website/i18n/bn/docusaurus-plugin-content-docs/current/concepts/modifiers/auto_dispose.mdx(1 hunks)website/i18n/bn/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx(1 hunks)website/i18n/bn/docusaurus-plugin-content-docs/current/concepts/providers.mdx(1 hunks)website/i18n/bn/docusaurus-plugin-content-docs/current/concepts/reading.mdx(2 hunks)website/i18n/bn/docusaurus-plugin-content-docs/current/cookbooks/testing.mdx(1 hunks)website/i18n/bn/docusaurus-plugin-content-docs/current/migration/0.13.0_to_0.14.0.mdx(1 hunks)website/i18n/bn/docusaurus-plugin-content-docs/current/migration/0.14.0_to_1.0.0.mdx(1 hunks)website/i18n/de/docusaurus-plugin-content-docs/current/concepts/combining_providers.mdx(1 hunks)website/i18n/de/docusaurus-plugin-content-docs/current/concepts/modifiers/auto_dispose.mdx(1 hunks)website/i18n/de/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx(1 hunks)website/i18n/de/docusaurus-plugin-content-docs/current/concepts/providers.mdx(1 hunks)website/i18n/de/docusaurus-plugin-content-docs/current/concepts/reading.mdx(1 hunks)website/i18n/de/docusaurus-plugin-content-docs/current/cookbooks/testing.mdx(1 hunks)website/i18n/de/docusaurus-plugin-content-docs/current/migration/0.13.0_to_0.14.0.mdx(1 hunks)website/i18n/de/docusaurus-plugin-content-docs/current/migration/0.14.0_to_1.0.0.mdx(1 hunks)website/i18n/es/docusaurus-plugin-content-docs/current/concepts/combining_providers.mdx(1 hunks)website/i18n/es/docusaurus-plugin-content-docs/current/concepts/modifiers/auto_dispose.mdx(1 hunks)website/i18n/es/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx(1 hunks)website/i18n/es/docusaurus-plugin-content-docs/current/cookbooks/testing.mdx(1 hunks)website/i18n/es/docusaurus-plugin-content-docs/current/migration/0.13.0_to_0.14.0.mdx(1 hunks)website/i18n/es/docusaurus-plugin-content-docs/current/migration/0.14.0_to_1.0.0.mdx(1 hunks)website/i18n/it/docusaurus-plugin-content-docs/current/concepts/combining_providers.mdx(1 hunks)website/i18n/it/docusaurus-plugin-content-docs/current/concepts/modifiers/auto_dispose.mdx(1 hunks)website/i18n/it/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx(1 hunks)website/i18n/it/docusaurus-plugin-content-docs/current/concepts/providers.mdx(1 hunks)website/i18n/it/docusaurus-plugin-content-docs/current/concepts/reading.mdx(2 hunks)website/i18n/it/docusaurus-plugin-content-docs/current/cookbooks/testing.mdx(1 hunks)website/i18n/it/docusaurus-plugin-content-docs/current/from_provider/motivation/motivation.mdx(1 hunks)website/i18n/it/docusaurus-plugin-content-docs/current/from_provider/provider_vs_riverpod.mdx(1 hunks)website/i18n/it/docusaurus-plugin-content-docs/current/from_provider/quickstart.mdx(1 hunks)website/i18n/it/docusaurus-plugin-content-docs/current/migration/0.13.0_to_0.14.0.mdx(1 hunks)website/i18n/it/docusaurus-plugin-content-docs/current/migration/0.14.0_to_1.0.0.mdx(1 hunks)website/i18n/ja/docusaurus-plugin-content-docs/current/concepts/combining_providers.mdx(1 hunks)website/i18n/ja/docusaurus-plugin-content-docs/current/concepts/modifiers/auto_dispose.mdx(1 hunks)website/i18n/ja/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx(1 hunks)website/i18n/ja/docusaurus-plugin-content-docs/current/concepts/reading.mdx(2 hunks)website/i18n/ja/docusaurus-plugin-content-docs/current/cookbooks/testing.mdx(1 hunks)website/i18n/ja/docusaurus-plugin-content-docs/current/from_provider/motivation/motivation.mdx(1 hunks)website/i18n/ja/docusaurus-plugin-content-docs/current/from_provider/provider_vs_riverpod.mdx(1 hunks)website/i18n/ja/docusaurus-plugin-content-docs/current/from_provider/quickstart.mdx(1 hunks)website/i18n/ja/docusaurus-plugin-content-docs/current/migration/0.13.0_to_0.14.0.mdx(1 hunks)website/i18n/ja/docusaurus-plugin-content-docs/current/migration/0.14.0_to_1.0.0.mdx(1 hunks)website/i18n/ko/docusaurus-plugin-content-docs/current/concepts/combining_providers.mdx(1 hunks)website/i18n/ko/docusaurus-plugin-content-docs/current/concepts/modifiers/auto_dispose.mdx(1 hunks)website/i18n/ko/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx(1 hunks)website/i18n/ko/docusaurus-plugin-content-docs/current/concepts/providers.mdx(1 hunks)website/i18n/ko/docusaurus-plugin-content-docs/current/concepts/reading.mdx(2 hunks)website/i18n/ko/docusaurus-plugin-content-docs/current/cookbooks/testing.mdx(1 hunks)website/i18n/ko/docusaurus-plugin-content-docs/current/from_provider/motivation/motivation.mdx(1 hunks)website/i18n/ko/docusaurus-plugin-content-docs/current/from_provider/provider_vs_riverpod.mdx(1 hunks)website/i18n/ko/docusaurus-plugin-content-docs/current/from_provider/quickstart.mdx(1 hunks)website/i18n/ko/docusaurus-plugin-content-docs/current/migration/0.13.0_to_0.14.0.mdx(1 hunks)website/i18n/ko/docusaurus-plugin-content-docs/current/migration/0.14.0_to_1.0.0.mdx(1 hunks)website/i18n/ko/docusaurus-plugin-content-docs/current/whats_new.mdx(1 hunks)website/i18n/ru/docusaurus-plugin-content-docs/current/concepts/combining_providers.mdx(1 hunks)website/i18n/ru/docusaurus-plugin-content-docs/current/concepts/modifiers/auto_dispose.mdx(1 hunks)website/i18n/ru/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx(1 hunks)website/i18n/ru/docusaurus-plugin-content-docs/current/concepts/reading.mdx(2 hunks)website/i18n/ru/docusaurus-plugin-content-docs/current/cookbooks/testing.mdx(1 hunks)website/i18n/ru/docusaurus-plugin-content-docs/current/migration/0.13.0_to_0.14.0.mdx(1 hunks)website/i18n/ru/docusaurus-plugin-content-docs/current/migration/0.14.0_to_1.0.0.mdx(1 hunks)website/i18n/tr/docusaurus-plugin-content-docs/current/concepts/combining_providers.mdx(1 hunks)website/i18n/tr/docusaurus-plugin-content-docs/current/concepts/modifiers/auto_dispose.mdx(1 hunks)website/i18n/tr/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx(1 hunks)website/i18n/tr/docusaurus-plugin-content-docs/current/cookbooks/testing.mdx(1 hunks)website/i18n/tr/docusaurus-plugin-content-docs/current/migration/0.13.0_to_0.14.0.mdx(1 hunks)website/i18n/tr/docusaurus-plugin-content-docs/current/migration/0.14.0_to_1.0.0.mdx(1 hunks)website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/concepts/combining_providers.mdx(1 hunks)website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/concepts/modifiers/auto_dispose.mdx(1 hunks)website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx(1 hunks)website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/concepts/providers.mdx(1 hunks)website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/concepts/reading.mdx(2 hunks)website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cookbooks/testing.mdx(1 hunks)website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/from_provider/motivation/motivation.mdx(1 hunks)website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/from_provider/provider_vs_riverpod.mdx(1 hunks)website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/from_provider/quickstart.mdx(2 hunks)website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/migration/0.13.0_to_0.14.0.mdx(1 hunks)
⛔ Files not processed due to max files limit (2)
- website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/migration/0.14.0_to_1.0.0.mdx
- website/sidebars.js
✅ Files skipped from review due to trivial changes (83)
- website/docs/migration/0.13.0_to_0.14.0.mdx
- website/i18n/ru/docusaurus-plugin-content-docs/current/migration/0.13.0_to_0.14.0.mdx
- website/i18n/tr/docusaurus-plugin-content-docs/current/concepts/modifiers/auto_dispose.mdx
- website/docs/whats_new.mdx
- website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/concepts/modifiers/auto_dispose.mdx
- website/i18n/de/docusaurus-plugin-content-docs/current/concepts/providers.mdx
- website/i18n/ja/docusaurus-plugin-content-docs/current/cookbooks/testing.mdx
- website/i18n/ja/docusaurus-plugin-content-docs/current/migration/0.14.0_to_1.0.0.mdx
- website/i18n/ko/docusaurus-plugin-content-docs/current/migration/0.13.0_to_0.14.0.mdx
- website/i18n/ko/docusaurus-plugin-content-docs/current/concepts/modifiers/auto_dispose.mdx
- website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/concepts/providers.mdx
- website/i18n/es/docusaurus-plugin-content-docs/current/migration/0.14.0_to_1.0.0.mdx
- website/i18n/ja/docusaurus-plugin-content-docs/current/from_provider/quickstart.mdx
- website/i18n/bn/docusaurus-plugin-content-docs/current/migration/0.13.0_to_0.14.0.mdx
- website/docs/concepts2/overrides.mdx
- website/i18n/tr/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx
- website/i18n/es/docusaurus-plugin-content-docs/current/migration/0.13.0_to_0.14.0.mdx
- website/i18n/ko/docusaurus-plugin-content-docs/current/concepts/reading.mdx
- website/i18n/de/docusaurus-plugin-content-docs/current/migration/0.14.0_to_1.0.0.mdx
- website/i18n/it/docusaurus-plugin-content-docs/current/migration/0.14.0_to_1.0.0.mdx
- website/i18n/de/docusaurus-plugin-content-docs/current/cookbooks/testing.mdx
- website/i18n/es/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx
- website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx
- website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/concepts/reading.mdx
- website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/migration/0.13.0_to_0.14.0.mdx
- website/i18n/tr/docusaurus-plugin-content-docs/current/concepts/combining_providers.mdx
- website/docs/concepts2/mutations.mdx
- website/docs/from_provider/quickstart.mdx
- website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/from_provider/provider_vs_riverpod.mdx
- website/docs/concepts2/offline.mdx
- website/i18n/ko/docusaurus-plugin-content-docs/current/from_provider/motivation/motivation.mdx
- website/i18n/it/docusaurus-plugin-content-docs/current/from_provider/quickstart.mdx
- website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/concepts/combining_providers.mdx
- website/i18n/de/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx
- website/i18n/it/docusaurus-plugin-content-docs/current/concepts/modifiers/auto_dispose.mdx
- website/i18n/es/docusaurus-plugin-content-docs/current/concepts/modifiers/auto_dispose.mdx
- website/i18n/es/docusaurus-plugin-content-docs/current/concepts/combining_providers.mdx
- examples/first_app/pubspec.yaml
- website/i18n/bn/docusaurus-plugin-content-docs/current/cookbooks/testing.mdx
- website/i18n/ja/docusaurus-plugin-content-docs/current/from_provider/motivation/motivation.mdx
- website/i18n/it/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx
- website/i18n/bn/docusaurus-plugin-content-docs/current/concepts/reading.mdx
- website/i18n/ko/docusaurus-plugin-content-docs/current/whats_new.mdx
- website/i18n/tr/docusaurus-plugin-content-docs/current/migration/0.14.0_to_1.0.0.mdx
- website/i18n/it/docusaurus-plugin-content-docs/current/from_provider/provider_vs_riverpod.mdx
- website/i18n/ja/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx
- website/docs/concepts2/auto_dispose.mdx
- website/i18n/ru/docusaurus-plugin-content-docs/current/cookbooks/testing.mdx
- website/i18n/tr/docusaurus-plugin-content-docs/current/migration/0.13.0_to_0.14.0.mdx
- website/i18n/it/docusaurus-plugin-content-docs/current/concepts/reading.mdx
- website/i18n/bn/docusaurus-plugin-content-docs/current/concepts/modifiers/auto_dispose.mdx
- website/i18n/de/docusaurus-plugin-content-docs/current/concepts/modifiers/auto_dispose.mdx
- website/docs/from_provider/provider_vs_riverpod.mdx
- website/i18n/ko/docusaurus-plugin-content-docs/current/migration/0.14.0_to_1.0.0.mdx
- website/docs/concepts2/consumers.mdx
- website/i18n/de/docusaurus-plugin-content-docs/current/concepts/combining_providers.mdx
- website/i18n/it/docusaurus-plugin-content-docs/current/cookbooks/testing.mdx
- website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/from_provider/quickstart.mdx
- website/i18n/bn/docusaurus-plugin-content-docs/current/migration/0.14.0_to_1.0.0.mdx
- website/i18n/ja/docusaurus-plugin-content-docs/current/concepts/modifiers/auto_dispose.mdx
- website/i18n/ja/docusaurus-plugin-content-docs/current/concepts/combining_providers.mdx
- website/i18n/tr/docusaurus-plugin-content-docs/current/cookbooks/testing.mdx
- website/i18n/ko/docusaurus-plugin-content-docs/current/concepts/providers.mdx
- website/docs/concepts2/observers.mdx
- website/i18n/ru/docusaurus-plugin-content-docs/current/migration/0.14.0_to_1.0.0.mdx
- website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/from_provider/motivation/motivation.mdx
- website/docs/concepts2/providers.mdx
- website/i18n/bn/docusaurus-plugin-content-docs/current/concepts/combining_providers.mdx
- website/i18n/ko/docusaurus-plugin-content-docs/current/cookbooks/testing.mdx
- website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/cookbooks/testing.mdx
- website/i18n/ru/docusaurus-plugin-content-docs/current/concepts/modifiers/auto_dispose.mdx
- website/i18n/it/docusaurus-plugin-content-docs/current/migration/0.13.0_to_0.14.0.mdx
- website/i18n/de/docusaurus-plugin-content-docs/current/migration/0.13.0_to_0.14.0.mdx
- website/i18n/bn/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx
- website/i18n/ko/docusaurus-plugin-content-docs/current/from_provider/provider_vs_riverpod.mdx
- website/i18n/it/docusaurus-plugin-content-docs/current/concepts/providers.mdx
- website/i18n/it/docusaurus-plugin-content-docs/current/from_provider/motivation/motivation.mdx
- website/i18n/ru/docusaurus-plugin-content-docs/current/concepts/reading.mdx
- website/i18n/ko/docusaurus-plugin-content-docs/current/concepts/modifiers/family.mdx
- website/i18n/de/docusaurus-plugin-content-docs/current/concepts/reading.mdx
- website/i18n/es/docusaurus-plugin-content-docs/current/cookbooks/testing.mdx
- website/i18n/ja/docusaurus-plugin-content-docs/current/concepts/reading.mdx
- website/i18n/ko/docusaurus-plugin-content-docs/current/concepts/combining_providers.mdx
🚧 Files skipped from review as they are similar to previous changes (7)
- packages/riverpod_analyzer_utils/pubspec.yaml
- packages/riverpod/pubspec.yaml
- packages/riverpod_lint_flutter_test/pubspec.yaml
- packages/riverpod_lint/pubspec.yaml
- packages/riverpod_analyzer_utils_tests/pubspec.yaml
- packages/riverpod_generator/pubspec.yaml
- pubspec.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: riverpod_lint (master, packages/riverpod_analyzer_utils_tests)
- GitHub Check: riverpod_lint (stable, packages/riverpod_analyzer_utils)
- GitHub Check: riverpod_lint (stable, packages/riverpod_analyzer_utils_tests)
- GitHub Check: riverpod_lint (master, packages/riverpod_lint_flutter_test)
- GitHub Check: riverpod_lint (stable, packages/riverpod_lint_flutter_test)
- GitHub Check: check_generation
🔇 Additional comments (8)
website/i18n/ja/docusaurus-plugin-content-docs/current/from_provider/provider_vs_riverpod.mdx (2)
398-398: keepAlive link bump to dev.18 looks good.The URL resolves to the correct API page for Ref.keepAlive.
(pub.dev)
405-405: ChangeNotifierProvider legacy link is correct.The dev.18 legacy path exists and renders as expected.
(pub.dev)website/docs/migration/0.14.0_to_1.0.0.mdx (1)
230-231: No remaining dev.17 references in migration docs; all links point to 3.0.0-dev.18.website/docs/concepts2/containers.mdx (2)
41-41: LGTM: dev.18 link resolves correctly.The ProviderContainer.test doc URL is valid and matches 3.0.0‑dev.18. (pub.dev)
147-149: LGTM: reference anchors updated to dev.18.All three anchors resolve in 3.0.0‑dev.18. (pub.dev)
packages/internal_lint/pubspec.yaml (1)
10-10: Verify compatibility locally/CI
Dart isn’t available in this environment; please run the proposed matrix script in your local or CI setup to ensureanalyzer_plugin: ^0.13.0andcustom_lint_builder: ^0.8.0resolve correctly with bothanalyzer: ">=7.0.0 <8.0.0"andanalyzer: ">=8.0.0 <9.0.0".packages/lint_visitor_generator/pubspec.yaml (1)
10-11: Add CI matrix to guard widened version ranges
Ensurepub get(and a no-op build/codegen) succeeds for both minimum (analyzer:>=7.0.0 <8.0.0,build:>=3.0.0 <4.0.0,source_gen:>=3.0.0 <4.0.0) and maximum (analyzer:>=8.0.0 <9.0.0,build:>=4.0.0 <5.0.0,source_gen:>=4.0.0 <5.0.0) constraint sets.website/docs/concepts2/retry.mdx (1)
156-159: Fix ProviderException link and unpin Dart Error docs
- Update the ProviderException URL to the misc library path.
- Remove the Dart SDK version from the Error link to point at the unversioned stable docs.
-[ProviderException]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/ProviderException-class.html +[ProviderException]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/misc/ProviderException-class.html -[Error]: https://api.dart.dev/stable/2.19.6/dart-core/Error-class.html +[Error]: https://api.dart.dev/stable/dart-core/Error-class.html
| [Ref]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Ref-class.html | ||
| [Ref.watch]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Ref/watch.html | ||
| [Ref.listen]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Ref/listen.html | ||
| [Ref.invalidate]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Ref/invalidate.html | ||
| [Ref.refresh]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Ref/refresh.html | ||
| [Ref.read]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Ref/read.html | ||
| [WidgetRef.listen]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/WidgetRef/listen.html | ||
| [WidgetRef.listenManual]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/WidgetRef/listenManual.html | ||
| [WidgetRef]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/WidgetRef-class.html | ||
| [onDispose]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Ref/onDispose.html | ||
| [onCancel]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Ref/onCancel.html | ||
| [onPause]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Ref/onPause.html | ||
| [select]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/misc/ProviderListenable/select.html | ||
| [ProviderSubscription]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/ProviderSubscription-class.html No newline at end of file |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Validate all dev.18 anchors (possible 404 for select).
The bulk update looks fine, but pub.dev’s paths for extension methods like select can shift between releases (sometimes under riverpod vs misc). Please verify each URL returns 200.
Run this link check locally:
If any non-200s, I can adjust the paths (e.g., misc → riverpod or vice versa).
🏁 Script executed:
#!/bin/bash
set -euo pipefail
urls=(
'https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Ref-class.html'
'https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Ref/watch.html'
'https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Ref/listen.html'
'https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Ref/invalidate.html'
'https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Ref/refresh.html'
'https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Ref/read.html'
'https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/WidgetRef/listen.html'
'https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/WidgetRef/listenManual.html'
'https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/WidgetRef-class.html'
'https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Ref/onDispose.html'
'https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Ref/onCancel.html'
'https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/Ref/onPause.html'
'https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/misc/ProviderListenable/select.html'
'https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/ProviderSubscription-class.html'
)
for u in "${urls[@]}"; do
code=$(curl -s -o /dev/null -w "%{http_code}" "$u")
printf "%3s %s\n" "$code" "$u"
doneLength of output: 1366
🏁 Script executed:
#!/bin/bash
set -euo pipefail
urls=(
'https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/ProviderListenable/select.html'
)
for u in "${urls[@]}"; do
code=$(curl -s -o /dev/null -w "%{http_code}" "$u")
printf "%3s %s\n" "$code" "$u"
doneLength of output: 108
Fix 404 doc links for select and onPause.
- Remove the
[onPause]anchor—Refhas noonPausemethod (usepause()onProviderSubscriptioninstead) (pub.dev) - Update the
[select]anchor to point tohttps://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/ProviderListenableSelect/select.html(pub.dev)
🤖 Prompt for AI Agents
In website/docs/concepts2/refs.mdx around lines 392 to 405, the doc links
include a nonexistent [onPause] anchor and an incorrect [select] URL; remove the
[onPause] entry entirely (Ref has no onPause method) and update the [select]
link target to
https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/hooks_riverpod/ProviderListenableSelect/select.html
so it points to ProviderListenableSelect.select on pub.dev.
|
|
||
|
|
||
| [statenotifierprovider]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.17/legacy/StateNotifierProvider-class.html | ||
| [statenotifierprovider]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/legacy/StateNotifierProvider-class.html |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Link bump to dev.18 looks fine; please verify it resolves (and matches the EN doc).
Confirm the pub.dev URL returns 200 and that the same version is referenced across other locales to avoid drift.
Run:
🏁 Script executed:
#!/bin/bash
set -euo pipefail
url="https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/legacy/StateNotifierProvider-class.html"
# Check status and final destination
curl -sIL "$url" | awk '/^HTTP\/|^location:/'Length of output: 11
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Find all migration files for version 0.13.0_to_0.14.0 and print the StateNotifierProvider link in each
find website -type f -path "*migration/0.13.0_to_0.14.0.mdx" | sort | while read file; do
echo
echo "$file:"
grep -n "\[statenotifierprovider\]" "$file" || echo " (link not found)"
doneLength of output: 2317
Fix French locale StateNotifierProvider link
- In website/i18n/fr/docusaurus-plugin-content-docs/current/migration/0.13.0_to_0.14.0.mdx (line 118), replace
https://pub.dev/documentation/riverpod/latest/riverpod/StateNotifierProvider-class.html
with
https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/legacy/StateNotifierProvider-class.htmlto match the English and other locales.
🤖 Prompt for AI Agents
In
website/i18n/fr/docusaurus-plugin-content-docs/current/migration/0.13.0_to_0.14.0.mdx
around line 118, the StateNotifierProvider link points to the old riverpod URL;
replace the URL
`https://pub.dev/documentation/riverpod/latest/riverpod/StateNotifierProvider-class.html`
with
`https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/legacy/StateNotifierProvider-class.html`
so it matches the English and other locales.
| [sandbox]: https://dartpad.dev/?null_safety=true&id=ef06ab3ce0b822e6cc5db0575248e6e2 | ||
| [Provider]: https://pub.dev/packages/provider | ||
| [ChangeNotifierProvider]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.17/legacy/ChangeNotifierProvider-class.html | ||
| [ChangeNotifierProvider]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/legacy/ChangeNotifierProvider-class.html |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Confirm dev-pinned link and target package for ChangeNotifierProvider.
The URL points to hooks_riverpod 3.0.0-dev.18 under legacy. If the intent is stable docs or Flutter-focused docs, consider using flutter_riverpod or an unpinned "latest" link to reduce churn.
If you prefer flutter_riverpod (Flutter API surface), apply:
-[ChangeNotifierProvider]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/legacy/ChangeNotifierProvider-class.html
+[ChangeNotifierProvider]: https://pub.dev/documentation/flutter_riverpod/latest/legacy/ChangeNotifierProvider-class.htmlOr, if dev pinning is intentional, confirm the package choice:
🌐 Web query:
Is ChangeNotifierProvider officially documented under flutter_riverpod vs hooks_riverpod for Riverpod v3, and does the dev tag 3.0.0-dev.18 resolve for both packages on pub.dev?
💡 Result:
Short answer: Yes — ChangeNotifierProvider is documented as a Flutter-only provider (available for flutter_riverpod and hooks_riverpod) but in Riverpod v3 it was moved out of the main API into the legacy imports (package:.../legacy.dart). And no — there is no 3.0.0-dev.18 release on pub.dev for flutter_riverpod or hooks_riverpod (pub.dev prerelease shows up to 3.0.0-dev.17), so 3.0.0-dev.18 will not resolve on pub.dev.
Sources:
- Riverpod v3 migration / ChangeNotifierProvider -> legacy import. [1]
- ChangeNotifierProvider API page (flutter_riverpod). [2]
- hooks_riverpod / flutter_riverpod prerelease info showing latest dev tag 3.0.0-dev.17 on pub.dev. [3][4]
Update ChangeNotifierProvider doc link
ChangeNotifierProvider was moved to the legacy API in Riverpod v3 and the 3.0.0-dev.18 tag isn’t published on pub.dev; replace it with flutter_riverpod’s unpinned “latest” link:
-[ChangeNotifierProvider]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/legacy/ChangeNotifierProvider-class.html
+[ChangeNotifierProvider]: https://pub.dev/documentation/flutter_riverpod/latest/legacy/ChangeNotifierProvider-class.html📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| [ChangeNotifierProvider]: https://pub.dev/documentation/hooks_riverpod/3.0.0-dev.18/legacy/ChangeNotifierProvider-class.html | |
| [ChangeNotifierProvider]: https://pub.dev/documentation/flutter_riverpod/latest/legacy/ChangeNotifierProvider-class.html |
🤖 Prompt for AI Agents
In
website/i18n/ko/docusaurus-plugin-content-docs/current/from_provider/quickstart.mdx
around line 190, the ChangeNotifierProvider link points to an unpublished dev
tag on hooks_riverpod; update the reference to use flutter_riverpod's unpinned
"latest" pub.dev documentation URL instead (replace the existing URL with the
flutter_riverpod latest link for the legacy ChangeNotifierProvider page on
pub.dev).
Summary by CodeRabbit