Skip to content

Commit b3f5628

Browse files
authored
Merge pull request #3371 from simolus3/app-migration-tooling
Make the example app use the new migration tooling
2 parents 7f18724 + 46fde3b commit b3f5628

File tree

30 files changed

+2040
-610
lines changed

30 files changed

+2040
-610
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Setup Flutter
3030
uses: subosito/flutter-action@v2
3131
with:
32-
flutter-version: 3.24
32+
flutter-version: 3.27
3333
cache: true
3434
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
3535
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
@@ -283,11 +283,7 @@ jobs:
283283
needs: [setup]
284284
strategy:
285285
matrix:
286-
# We want to support the two latest stable Flutter versions
287-
# Unfortunately, we currently can't support Flutter 3.22 because it's
288-
# incompatible with `dart_style: ^2.3.7` that `drift_dev` has to use:
289-
# https://github.com/simolus3/drift/issues/3302
290-
flutter: ["3.24"]
286+
flutter: ["3.24", "3.27"]
291287

292288
steps:
293289
- uses: actions/checkout@v4

drift/lib/src/runtime/query_builder/statements/select/select_with_join.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ class JoinedSelectStatement<FirstT extends HasResultSet, FirstD>
113113

114114
for (final join in _joins) {
115115
if (onlyResults &&
116-
!(join.includeInResult ?? _includeJoinedTablesInResult)) continue;
116+
!(join.includeInResult ?? _includeJoinedTablesInResult)) {
117+
continue;
118+
}
117119

118120
yield join.table as ResultSetImplementation;
119121
}

drift/test/test_utils/test_utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import 'package:mockito/mockito.dart';
66

77
export 'database_stub.dart'
88
if (dart.library.ffi) 'database_vm.dart'
9-
if (dart.library.js) 'database_web.dart';
9+
if (dart.library.js_interop) 'database_web.dart';
1010
export 'matchers.dart';
1111
export 'mocks.dart';
1212

drift_dev/lib/src/analysis/resolver/dart/helper.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ bool isFromDrift(DartType type) {
191191

192192
extension IsFromDrift on Element {
193193
bool get isFromDefaultTable {
194+
// ignore: deprecated_member_use
194195
final parent = enclosingElement;
195196

196197
return parent is ClassElement &&

drift_dev/lib/src/analysis/resolver/dart/view.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ class DartViewResolver extends LocalElementResolver<DiscoveredDartView> {
5858
final typeSystem = field.library.typeSystem;
5959

6060
if (type is! InterfaceType ||
61-
!typeSystem.isAssignableTo(type, knownTypes.tableType)) return null;
61+
!typeSystem.isAssignableTo(type, knownTypes.tableType)) {
62+
return null;
63+
}
6264

6365
if (field.getter != null) {
6466
try {

drift_dev/lib/src/analysis/results/dart.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ class _AddFromAst extends GeneralizingAstVisitor<void> {
588588
}
589589

590590
final element = node.methodName.staticElement;
591+
// ignore: deprecated_member_use
591592
final enclosing = element?.enclosingElement;
592593
if (enclosing is! ExtensionElement || enclosing.name == null) {
593594
return super.visitMethodInvocation(node);

drift_dev/lib/src/backends/analyzer_context_backend.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ class AnalysisContextBackend extends DriftBackend {
179179
await this.context.currentSession.getResolvedLibrary(pathForTemp);
180180

181181
if (result is ResolvedLibraryResult) {
182+
// ignore: deprecated_member_use
182183
return result.element.scope.lookup(reference).getter;
183184
}
184185
} finally {

drift_dev/lib/src/backends/build/backend.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class DriftBuildBackend extends DriftBackend {
110110

111111
if (await _buildStep.canRead(tempDart)) {
112112
final library = await _buildStep.resolver.libraryFor(tempDart);
113-
113+
// ignore: deprecated_member_use
114114
return library.scope.lookup(reference).getter;
115115
} else {
116116
// If there's no temporary file whose imports we can use, then that means

drift_dev/lib/src/writer/import_manager.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class ImportManagerForPartFiles implements ImportManager {
1313
final Map<String, Map<String, Element>> _namedImports = {};
1414

1515
ImportManagerForPartFiles(this.mainLibrary) {
16+
// ignore: deprecated_member_use
1617
for (final import in mainLibrary.libraryImports) {
1718
if (import.prefix case ImportElementPrefix prefix) {
1819
// Not using import.namespace here because that contains the prefix

drift_dev/test/analysis/test_utils.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ class TestBackend extends DriftBackend {
232232
await analysisContext.currentSession.getResolvedLibrary(path);
233233

234234
if (result is ResolvedLibraryResult) {
235+
// ignore: deprecated_member_use
235236
final lookup = result.element.scope.lookup(reference);
236237
return lookup.getter;
237238
}

0 commit comments

Comments
 (0)