Skip to content

Commit

Permalink
Fix pub get
Browse files Browse the repository at this point in the history
  • Loading branch information
rrousselGit committed Jan 8, 2025
1 parent cde2f52 commit f88ba03
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 24 deletions.
4 changes: 2 additions & 2 deletions packages/lint_visitor_generator/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ environment:
sdk: ">=3.0.0 <4.0.0"

dependencies:
analyzer: ">=5.12.0 <7.0.0"
analyzer: ^7.0.0
build: ^2.3.1
build_config: ^1.1.0
collection: ^1.17.1
meta: ^1.7.0
path: ^1.9.0
source_gen: ^1.2.3
source_gen: ^2.0.0
source_span: ^1.10.0

dev_dependencies:
Expand Down
3 changes: 1 addition & 2 deletions packages/riverpod/test/meta_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,7 @@ class _PublicAPIVisitor extends GeneralizingElementVisitor<void> {
}

void _verifyInheritsAnnotations(Element element) {
// ignore: deprecated_member_use, needed to support older SDK
final parent = element.enclosingElement;
final parent = element.enclosingElement3;

if (parent is! ClassElement) return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ extension RefInvocationX on MethodInvocation {
final functionOwner = function.staticElement
.cast<MethodElement>()
?.declaration
// ignore: deprecated_member_use, required to support lower versions of analyzer
.enclosingElement;
.enclosingElement3;

if (functionOwner == null ||
// Since Ref is sealed, checking that the function is from the package:riverpod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ extension WidgetRefInvocationX on MethodInvocation {
final functionOwner = function.staticElement
.cast<MethodElement>()
?.declaration
// ignore: deprecated_member_use, required to support lower versions of analyzer
.enclosingElement;
.enclosingElement3;

if (functionOwner == null ||
// Since Ref is sealed, checking that the function is from the package:riverpod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ ClassElement? _findStateFromReturnType(ClassElement node) {
}

ClassElement? _findStateWithMatchingGeneric(ClassElement node) {
for (final clazz in node
// ignore: deprecated_member_use, required to support lower versions of analyzer
.enclosingElement
.classes) {
for (final clazz in node.enclosingElement3.classes) {
final type = clazz.supertype;
if (type != null && isState(type) && _findStateWidget(clazz) == node) {
return clazz;
Expand Down
2 changes: 1 addition & 1 deletion packages/riverpod_analyzer_utils/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
analyzer: ^7.0.0
collection: ^1.16.0
crypto: ^3.0.2
custom_lint_core: ^0.7.0
custom_lint_core: ^0.7.1
freezed_annotation: ^2.2.0
meta: ^1.7.0
path: ^1.8.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ class UnknownScopedUsage extends RiverpodLintRule {
if (override?.provider == identifier) return;

final enclosingConstructorType = identifier
.node
.staticParameterElement
// ignore: deprecated_member_use, required to support lower versions of analyzer
?.enclosingElement
.node.staticParameterElement?.enclosingElement3
.safeCast<ConstructorElement>()
?.returnType;
// Silence the warning if passed to a widget constructor.
Expand Down
4 changes: 2 additions & 2 deletions packages/riverpod_lint_flutter_test/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ dev_dependencies:
flutter_test:
sdk: flutter
glob: ^2.1.2
analyzer: ^6.0.0
analyzer: ^7.0.0
path: ^1.9.0
source_span: ^1.10.0
analyzer_plugin: ^0.11.3
analyzer_plugin: ^0.12.0

dependency_overrides:
riverpod_generator:
Expand Down
2 changes: 1 addition & 1 deletion website/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies:

dev_dependencies:
build_runner:
custom_lint: ^0.7.0
custom_lint: ^0.7.1
flutter_test:
sdk: flutter
freezed: ^2.2.0
Expand Down
7 changes: 3 additions & 4 deletions website/pubspec_overrides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ dependency_overrides:
riverpod_lint:
path: ../packages/riverpod_lint

## Needed due to Flutter not supporting 6.0.0 yet
analyzer: ^6.0.0
analyzer_plugin: ^0.11.3

# Hotreloader issue
vm_service: ^14.0.0
flutter_riverpod:
Expand All @@ -21,3 +17,6 @@ dependency_overrides:
path: ../packages/riverpod_annotation
riverpod_generator:
path: ../packages/riverpod_generator

# For flutter_test
test_api: ^0.7.4

0 comments on commit f88ba03

Please sign in to comment.