Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Builder giving undexpected error/warning .drfit file #3364

Open
Vedsaga opened this issue Nov 30, 2024 · 2 comments
Open

Builder giving undexpected error/warning .drfit file #3364

Vedsaga opened this issue Nov 30, 2024 · 2 comments

Comments

@Vedsaga
Copy link

Vedsaga commented Nov 30, 2024

Describe the bug

Below is the log, now sure why is it happening and not sure what to make sense out of it.


[WARNING] drift_dev on lib/config/app_db/query/file_remote_details_query.dart:
line 8, column 7 of package:mytrailpals/config/app_db/query/file_remote_details_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
  ╷
8 │ class FileRemoteDetailsQuery extends DatabaseAccessor<AppDatabase>
  │       ^^^^^^^^^^^^^^^^^^^^^^
  ╵
[WARNING] drift_dev on lib/config/app_db/query/file_local_details_query.dart:
line 8, column 7 of package:mytrailpals/config/app_db/query/file_local_details_query.dart: Could not read tables from @DriftAccessor annotation!

Please make sure that all table classes exist.
  ╷
8 │ class FileLocalDetailsQuery extends DatabaseAccessor<AppDatabase>
  │       ^^^^^^^^^^^^^^^^^^^^^
  ╵
[WARNING] drift_dev on lib/config/app_db/query/one_tap_login_query.dart:
line 11, column 7 of package:mytrailpals/config/app_db/query/one_tap_login_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
   ╷
11 │ class OneTapLoginQuery extends DatabaseAccessor<AppDatabase>
   │       ^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/query/file_upload_details_query.dart:
line 8, column 7 of package:mytrailpals/config/app_db/query/file_upload_details_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
  ╷
8 │ class FileUploadDetailsQuery extends DatabaseAccessor<AppDatabase>
  │       ^^^^^^^^^^^^^^^^^^^^^^
  ╵
[WARNING] drift_dev on lib/config/app_db/query/chat_sync_query.dart:
line 8, column 7 of package:mytrailpals/config/app_db/query/chat_sync_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
  ╷
8 │ class ChatSyncQuery extends DatabaseAccessor<AppDatabase>
  │       ^^^^^^^^^^^^^
  ╵
[WARNING] drift_dev on lib/config/app_db/query/file_metadata_query.dart:
line 9, column 7 of package:mytrailpals/config/app_db/query/file_metadata_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
  ╷
9 │ class FileMetadataQuery extends DatabaseAccessor<AppDatabase>
  │       ^^^^^^^^^^^^^^^^^
  ╵
[WARNING] drift_dev on lib/config/app_db/query/image_metadata_query.dart:
line 8, column 7 of package:mytrailpals/config/app_db/query/image_metadata_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
  ╷
8 │ class ImageMetadataQuery extends DatabaseAccessor<AppDatabase>
  │       ^^^^^^^^^^^^^^^^^^
  ╵
[WARNING] drift_dev on lib/config/app_db/query/file_transformation_links_query.dart:
line 18, column 7 of package:mytrailpals/config/app_db/query/file_transformation_links_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
   ╷
18 │ class FileTransformationLinksQuery extends DatabaseAccessor<AppDatabase>
   │       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/query/notification_stats_query.dart:
line 8, column 7 of package:mytrailpals/config/app_db/query/notification_stats_query.dart: Could not read tables from @DriftAccessor annotation!

Please make sure that all table classes exist.
  ╷
8 │ class NotificationStatsQuery extends DatabaseAccessor<AppDatabase>
  │       ^^^^^^^^^^^^^^^^^^^^^^
  ╵
[WARNING] drift_dev on lib/config/app_db/query/route_time_tracking_query.dart:
line 12, column 7 of package:mytrailpals/config/app_db/query/route_time_tracking_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
   ╷
12 │ class RouteTimeTrackingQuery extends DatabaseAccessor<AppDatabase>
   │       ^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/query/post_query.dart:
line 10, column 7 of package:mytrailpals/config/app_db/query/post_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
   ╷
10 │ class PostQuery extends DatabaseAccessor<AppDatabase>
   │       ^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/query/video_metadata_query.dart:
line 14, column 7 of package:mytrailpals/config/app_db/query/video_metadata_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
   ╷
14 │ class VideoMetadataQuery extends DatabaseAccessor<AppDatabase>
   │       ^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/query/route_timer_preferences_query.dart:
line 12, column 7 of package:mytrailpals/config/app_db/query/route_timer_preferences_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
   ╷
12 │ class RouteTimerPreferencesQuery extends DatabaseAccessor<AppDatabase>
   │       ^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/query/pending_upload_file_entity_link_query.dart:
line 15, column 7 of package:mytrailpals/config/app_db/query/pending_upload_file_entity_link_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
   ╷
15 │ class PendingUploadFileEntityLinkQuery extends DatabaseAccessor<AppDatabase>
   │       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/schema/pending_upload_file_entity_link.drift:
line 23, column 1: Expected another table constraint
   ╷
23 │ );
   │ ^
   ╵
[WARNING] drift_dev on lib/config/app_db/schema/pending_upload_file_entity_link.drift:
line 3, column 1: The imported file, `package:mytrailpals/common/enum/app_level_common_enum.dart`, does not exist or can't be imported.
  ╷
3 │ import 'package:mytrailpals/common/enum/app_level_common_enum.dart';
  │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
Could not deserialize DriftElementId(package:mytrailpals/config/app_db/schema/one_tap_login.drift, one_tap_login_table)
Internal error while deserializing DriftElementId(package:mytrailpals/config/app_db/schema/one_tap_login.drift, one_tap_login_table): type 'Null' is not a subtype of type 'Map<dynamic, dynamic>' in type cast at
#0      ElementDeserializer.readDriftElement (package:drift_dev/src/analysis/serializer.dart:466:60)
<asynchronous suspension>
#1      DriftResolver._restoreOrResolve (package:drift_dev/src/analysis/resolver/resolver.dart:48:16)
<asynchronous suspension>
#2      DriftResolver.resolveEntrypoint (package:drift_dev/src/analysis/resolver/resolver.dart:42:12)
<asynchronous suspension>
#3      DriftAnalysisDriver.resolveElement (package:drift_dev/src/analysis/driver/driver.dart:270:16)
<asynchronous suspension>
#4      DriftAnalysisDriver._analyzeLocalElements (package:drift_dev/src/analysis/driver/driver.dart:255:7)
<asynchronous suspension>
#5      DriftAnalysisDriver.resolveElements (package:drift_dev/src/analysis/driver/driver.dart:322:5)
<asynchronous suspension>
#6      FileAnalyzer.runAnalysisOn (package:drift_dev/src/analysis/resolver/file_analysis.dart:35:30)
<asynchronous suspension>
#7      DriftAnalysisDriver.fullyAnalyze (package:drift_dev/src/analysis/driver/driver.dart:335:22)
<asynchronous suspension>
#8      _DriftBuildRun._analyze (package:drift_dev/src/backends/build/drift_builder.dart:196:20)
<asynchronous suspension>
#9      _DriftBuildRun.run (package:drift_dev/src/backends/build/drift_builder.dart:174:9)
<asynchronous suspension>
#10     DriftBuilder.build (package:drift_dev/src/backends/build/drift_builder.dart:109:5)
<asynchronous suspension>
#11     runBuilder.buildForInput (package:build/src/generate/run_builder.dart:83:7)
<asynchronous suspension>
#12     Future.wait.<anonymous closure> (dart:async/future.dart:520:21)
<asynchronous suspension>
#13     scopeLogAsync.<anonymous closure> (package:build/src/builder/logging.dart:32:40)
<asynchronous suspension>

[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 56, column 20: Semantically equivalent date time values may be formatted differently and can't be compared directly. Consider comparing the `unixepoch()` values of the time value instead.
   ╷
56 │     AND child.date = parent.date
   │                    ^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 59, column 5: This compares two date time values lexicographically. To compare date time values, compare their `unixepoch()` value instead.
   ╷
59 │     parent.date BETWEEN :date_from AND :date_to
   │     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 95, column 20: Semantically equivalent date time values may be formatted differently and can't be compared directly. Consider comparing the `unixepoch()` values of the time value instead.
   ╷
95 │     AND child.date = parent.date
   │                    ^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 98, column 17: Semantically equivalent date time values may be formatted differently and can't be compared directly. Consider comparing the `unixepoch()` values of the time value instead.
   ╷
98 │     parent.date = :date
   │                 ^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 41, column 11: Could not find image_metadata_table. Available are: links (alias to file_transformation_links_table), processed_details (alias to file_local_details_table)
   ╷
41 │ LEFT JOIN image_metadata_table image_metadata
   │           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 37, column 8: Unknown table or view: image_metadata
   ╷
37 │        image_metadata.blur_hash, image_metadata.image_id
   │        ^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 37, column 34: Unknown table or view: image_metadata
   ╷
37 │        image_metadata.blur_hash, image_metadata.image_id
   │                                  ^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 42, column 42: Unknown table or view: image_metadata
   ╷
42 │     ON processed_details.file_md5_hash = image_metadata.file_md5_hash
   │                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 37, column 8: Expression has an unknown type, the generated code can be inaccurate.
   ╷
37 │        image_metadata.blur_hash, image_metadata.image_id
   │        ^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 37, column 34: Expression has an unknown type, the generated code can be inaccurate.
   ╷
37 │        image_metadata.blur_hash, image_metadata.image_id
   │                                  ^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/query/file_remote_details_query.dart:
line 8, column 7 of package:mytrailpals/config/app_db/query/file_remote_details_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
  ╷
8 │ class FileRemoteDetailsQuery extends DatabaseAccessor<AppDatabase>
  │       ^^^^^^^^^^^^^^^^^^^^^^
  ╵
[WARNING] drift_dev on lib/config/app_db/query/file_local_details_query.dart:
line 8, column 7 of package:mytrailpals/config/app_db/query/file_local_details_query.dart: Could not read tables from @DriftAccessor annotation!

Please make sure that all table classes exist.
  ╷
8 │ class FileLocalDetailsQuery extends DatabaseAccessor<AppDatabase>
  │       ^^^^^^^^^^^^^^^^^^^^^
  ╵
[WARNING] drift_dev on lib/config/app_db/query/one_tap_login_query.dart:
line 11, column 7 of package:mytrailpals/config/app_db/query/one_tap_login_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
   ╷
11 │ class OneTapLoginQuery extends DatabaseAccessor<AppDatabase>
   │       ^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/query/file_upload_details_query.dart:
line 8, column 7 of package:mytrailpals/config/app_db/query/file_upload_details_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
  ╷
8 │ class FileUploadDetailsQuery extends DatabaseAccessor<AppDatabase>
  │       ^^^^^^^^^^^^^^^^^^^^^^
  ╵
[WARNING] drift_dev on lib/config/app_db/query/chat_sync_query.dart:
line 8, column 7 of package:mytrailpals/config/app_db/query/chat_sync_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
  ╷
8 │ class ChatSyncQuery extends DatabaseAccessor<AppDatabase>
  │       ^^^^^^^^^^^^^
  ╵
[WARNING] drift_dev on lib/config/app_db/query/file_metadata_query.dart:
line 9, column 7 of package:mytrailpals/config/app_db/query/file_metadata_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
  ╷
9 │ class FileMetadataQuery extends DatabaseAccessor<AppDatabase>
  │       ^^^^^^^^^^^^^^^^^
  ╵
[WARNING] drift_dev on lib/config/app_db/query/image_metadata_query.dart:
line 8, column 7 of package:mytrailpals/config/app_db/query/image_metadata_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
  ╷
8 │ class ImageMetadataQuery extends DatabaseAccessor<AppDatabase>
  │       ^^^^^^^^^^^^^^^^^^
  ╵
[WARNING] drift_dev on lib/config/app_db/query/file_transformation_links_query.dart:
line 18, column 7 of package:mytrailpals/config/app_db/query/file_transformation_links_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
   ╷
18 │ class FileTransformationLinksQuery extends DatabaseAccessor<AppDatabase>
   │       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/query/notification_stats_query.dart:
line 8, column 7 of package:mytrailpals/config/app_db/query/notification_stats_query.dart: Could not read tables from @DriftAccessor annotation!

Please make sure that all table classes exist.
  ╷
8 │ class NotificationStatsQuery extends DatabaseAccessor<AppDatabase>
  │       ^^^^^^^^^^^^^^^^^^^^^^
  ╵
[WARNING] drift_dev on lib/config/app_db/query/route_time_tracking_query.dart:
line 12, column 7 of package:mytrailpals/config/app_db/query/route_time_tracking_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
   ╷
12 │ class RouteTimeTrackingQuery extends DatabaseAccessor<AppDatabase>
   │       ^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/query/post_query.dart:
line 10, column 7 of package:mytrailpals/config/app_db/query/post_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
   ╷
10 │ class PostQuery extends DatabaseAccessor<AppDatabase>
   │       ^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/query/video_metadata_query.dart:
line 14, column 7 of package:mytrailpals/config/app_db/query/video_metadata_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
   ╷
14 │ class VideoMetadataQuery extends DatabaseAccessor<AppDatabase>
   │       ^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/query/route_timer_preferences_query.dart:
line 12, column 7 of package:mytrailpals/config/app_db/query/route_timer_preferences_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
   ╷
12 │ class RouteTimerPreferencesQuery extends DatabaseAccessor<AppDatabase>
   │       ^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/query/pending_upload_file_entity_link_query.dart:
line 15, column 7 of package:mytrailpals/config/app_db/query/pending_upload_file_entity_link_query.dart: Could not read tables from @DriftAccessor annotation!
Please make sure that all table classes exist.
   ╷
15 │ class PendingUploadFileEntityLinkQuery extends DatabaseAccessor<AppDatabase>
   │       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/schema/pending_upload_file_entity_link.drift:
line 23, column 1: Expected another table constraint
   ╷
23 │ );
   │ ^
   ╵
[WARNING] drift_dev on lib/config/app_db/schema/pending_upload_file_entity_link.drift:
line 3, column 1: The imported file, `package:mytrailpals/common/enum/app_level_common_enum.dart`, does not exist or can't be imported.
  ╷
3 │ import 'package:mytrailpals/common/enum/app_level_common_enum.dart';
  │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
Could not deserialize DriftElementId(package:mytrailpals/config/app_db/schema/one_tap_login.drift, one_tap_login_table)
Internal error while deserializing DriftElementId(package:mytrailpals/config/app_db/schema/one_tap_login.drift, one_tap_login_table): type 'Null' is not a subtype of type 'Map<dynamic, dynamic>' in type cast at
#0      ElementDeserializer.readDriftElement (package:drift_dev/src/analysis/serializer.dart:466:60)
<asynchronous suspension>
#1      DriftResolver._restoreOrResolve (package:drift_dev/src/analysis/resolver/resolver.dart:48:16)
<asynchronous suspension>
#2      DriftResolver.resolveEntrypoint (package:drift_dev/src/analysis/resolver/resolver.dart:42:12)
<asynchronous suspension>
#3      DriftAnalysisDriver.resolveElement (package:drift_dev/src/analysis/driver/driver.dart:270:16)
<asynchronous suspension>
#4      DriftAnalysisDriver._analyzeLocalElements (package:drift_dev/src/analysis/driver/driver.dart:255:7)
<asynchronous suspension>
#5      DriftAnalysisDriver.resolveElements (package:drift_dev/src/analysis/driver/driver.dart:322:5)
<asynchronous suspension>
#6      FileAnalyzer.runAnalysisOn (package:drift_dev/src/analysis/resolver/file_analysis.dart:35:30)
<asynchronous suspension>
#7      DriftAnalysisDriver.fullyAnalyze (package:drift_dev/src/analysis/driver/driver.dart:335:22)
<asynchronous suspension>
#8      _DriftBuildRun._analyze (package:drift_dev/src/backends/build/drift_builder.dart:196:20)
<asynchronous suspension>
#9      _DriftBuildRun.run (package:drift_dev/src/backends/build/drift_builder.dart:174:9)
<asynchronous suspension>
#10     DriftBuilder.build (package:drift_dev/src/backends/build/drift_builder.dart:109:5)
<asynchronous suspension>
#11     runBuilder.buildForInput (package:build/src/generate/run_builder.dart:83:7)
<asynchronous suspension>
#12     Future.wait.<anonymous closure> (dart:async/future.dart:520:21)
<asynchronous suspension>
#13     scopeLogAsync.<anonymous closure> (package:build/src/builder/logging.dart:32:40)
<asynchronous suspension>

[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 56, column 20: Semantically equivalent date time values may be formatted differently and can't be compared directly. Consider comparing the `unixepoch()` values of the time value instead.
   ╷
56 │     AND child.date = parent.date
   │                    ^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 59, column 5: This compares two date time values lexicographically. To compare date time values, compare their `unixepoch()` value instead.
   ╷
59 │     parent.date BETWEEN :date_from AND :date_to
   │     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 95, column 20: Semantically equivalent date time values may be formatted differently and can't be compared directly. Consider comparing the `unixepoch()` values of the time value instead.
   ╷
95 │     AND child.date = parent.date
   │                    ^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 98, column 17: Semantically equivalent date time values may be formatted differently and can't be compared directly. Consider comparing the `unixepoch()` values of the time value instead.
   ╷
98 │     parent.date = :date
   │                 ^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 41, column 11: Could not find image_metadata_table. Available are: links (alias to file_transformation_links_table), processed_details (alias to file_local_details_table)
   ╷
41 │ LEFT JOIN image_metadata_table image_metadata
   │           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 37, column 8: Unknown table or view: image_metadata
   ╷
37 │        image_metadata.blur_hash, image_metadata.image_id
   │        ^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 37, column 34: Unknown table or view: image_metadata
   ╷
37 │        image_metadata.blur_hash, image_metadata.image_id
   │                                  ^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 42, column 42: Unknown table or view: image_metadata
   ╷
42 │     ON processed_details.file_md5_hash = image_metadata.file_md5_hash
   │                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 37, column 8: Expression has an unknown type, the generated code can be inaccurate.
   ╷
37 │        image_metadata.blur_hash, image_metadata.image_id
   │        ^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 37, column 34: Expression has an unknown type, the generated code can be inaccurate.
   ╷
37 │        image_metadata.blur_hash, image_metadata.image_id
   │                                  ^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[INFO] 1m 37s elapsed, 705/705 actions completed.
[INFO] 1m 39s elapsed, 721/721 actions completed.
[INFO] 1m 41s elapsed, 737/739 actions completed.
[INFO] 1m 42s elapsed, 737/739 actions completed.
[INFO] 1m 43s elapsed, 749/765 actions completed.
[INFO] 1m 47s elapsed, 749/765 actions completed.
[INFO] 1m 48s elapsed, 770/786 actions completed.
[INFO] 1m 49s elapsed, 794/809 actions completed.
[INFO] 1m 50s elapsed, 808/823 actions completed.
[INFO] 1m 51s elapsed, 825/840 actions completed.
[INFO] 1m 52s elapsed, 850/865 actions completed.
[INFO] 1m 53s elapsed, 864/873 actions completed.
[INFO] 1m 54s elapsed, 870/873 actions completed.
[INFO] Running build completed, took 1m 55s

[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 614ms

[SEVERE] const_to_enum_generator:constToEnumBuilder on lib/src/rust/frb_generated.web.dart (cached):

This builder requires Dart inputs without syntax errors.
However, package:mytrailpals/src/rust/frb_generated.web.dart (or an existing part) contains the following errors.
frb_generated.web.dart:598:11: This requires the 'inline-class' language feature to be enabled.

Try fixing the errors and re-running the build.

[SEVERE] json_serializable on lib/src/rust/frb_generated.web.dart (cached):

This builder requires Dart inputs without syntax errors.
However, package:mytrailpals/src/rust/frb_generated.web.dart (or an existing part) contains the following errors.
frb_generated.web.dart:598:11: This requires the 'inline-class' language feature to be enabled.

Try fixing the errors and re-running the build.

[SEVERE] Failed after 1m 55s
)
[2024-11-30T20:17:54.533Z WARN C:\Users\harsh\.cargo\registry\src\index.crates.io-6f17d22bba15001f\flutter_rust_bridge_codegen-2.6.0\src\library\commands\command_runner.rs:153] command="powershell" "-noprofile" "-command" "& \"fvm\" \"--version\"" stdout= stderr=& : The term 'fvm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At line:1 char:3
+ & "fvm" "--version"
+   ~~~~~
    + CategoryInfo          : ObjectNotFound: (fvm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


[2024-11-30T20:17:54.534Z INFO C:\Users\harsh\.cargo\registry\src\index.crates.io-6f17d22bba15001f\flutter_rust_bridge_codegen-2.6.0\src\library\commands\fvm.rs:15] Has .fvmrc but no fvm binary installation, thus skip using fvm.
[2024-11-30T20:17:55.917Z WARN C:\Users\harsh\.cargo\registry\src\index.crates.io-6f17d22bba15001f\flutter_rust_bridge_codegen-2.6.0\src\library\commands\command_runner.rs:153] command="powershell" "-noprofile" "-command" "& \"fvm\" \"--version\"" stdout= stderr=& : The term 'fvm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At line:1 char:3
+ & "fvm" "--version"
+   ~~~~~
    + CategoryInfo          : ObjectNotFound: (fvm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


[2024-11-30T20:17:55.918Z INFO C:\Users\harsh\.cargo\registry\src\index.crates.io-6f17d22bba15001f\flutter_rust_bridge_codegen-2.6.0\src\library\commands\fvm.rs:15] Has .fvmrc but no fvm binary installation, thus skip using fvm.
[0.8s] Parse
  └── [0.7s] Cargo expand & syn parse
  └── [0.0s] Parse HIR
  └── [0.0s] Parse MIR
[0.1s] Generate
[130.3s] Polish
  └── [126.9s] Run Dart build_runner
  └── [1.4s] Run Dart fix
  └── [1.7s] Run Dart formatter
  └── [0.2s] Run Rust formatter
  └── [0.0s] Auto upgrade

Version

drift_dev: ^2.16.0
drift: ^2.16.0

@simolus3
Copy link
Owner

Regarding the "could not read tables" error, are you listing a table that was defined from a .drift file in the tables list? That is unsupported because the type doesn't exist at the time drift's analyzer runs (given that the table class still needs to be generated at that step). If you want to include tables from a .drift file in a Dart DAO, you need to use the include parameter on the annotation.

line 23, column 1: Expected another table constraint

This is probably due to a trailing comma in the table definition, which is not allowed.

Could not deserialize DriftElementId

This one is kind of interesting, can you post the one_tap_login_table definition? From the line numbers, it also sounds like you're on an older drift_version though - can you try upgrading and see if the error still happens on the latest version?

The error about a table being unknown is probably due to a missing import statement in the drift file itself.

I also recommend checking the datetime errors - if you have the option to store datetimes as text enabled, it's better to do unixepoch(child.date) = unixepoch(parent.date) for comparisons instead of comparing the unparsed datetime values.

@Vedsaga
Copy link
Author

Vedsaga commented Dec 3, 2024

Thank you, while most of issues seems to have resolved, still few persist.


[WARNING] drift_dev on lib/config/app_db/schema/one_tap_login.drift:
line 1, column 1: The imported file, `package:mytrailpals/common/enum/app_level_common_enum.dart`, does not exist or can't be imported.
  ╷
1 │ import 'package:mytrailpals/common/enum/app_level_common_enum.dart';
  │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
[WARNING] drift_dev on lib/config/app_db/schema/pending_upload_file_entity_link.drift:
line 3, column 1: The imported file, `package:mytrailpals/common/enum/app_level_common_enum.dart`, does not exist or can't be imported.
  ╷
3 │ import 'package:mytrailpals/common/enum/app_level_common_enum.dart';
  │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 41, column 11: Could not find image_metadata_table. Available are: links (alias to file_transformation_links_table), processed_details (alias to file_local_details_table)
   ╷
41 │ LEFT JOIN image_metadata_table image_metadata
   │           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 37, column 8: Unknown table or view: image_metadata
   ╷
37 │        image_metadata.blur_hash, image_metadata.image_id
   │        ^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 37, column 34: Unknown table or view: image_metadata
   ╷
37 │        image_metadata.blur_hash, image_metadata.image_id
   │                                  ^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 42, column 42: Unknown table or view: image_metadata
   ╷
42 │     ON processed_details.file_md5_hash = image_metadata.file_md5_hash
   │                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 37, column 8: Expression has an unknown type, the generated code can be inaccurate.
   ╷
37 │        image_metadata.blur_hash, image_metadata.image_id
   │        ^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
[WARNING] drift_dev on lib/config/app_db/app_database.dart:
line 37, column 34: Expression has an unknown type, the generated code can be inaccurate.
   ╷
37 │        image_metadata.blur_hash, image_metadata.image_id
   │                                  ^^^^^^^^^^^^^^^^^^^^^^^

Below are the tables

import 'package:xxx/common/enum/app_level_common_enum.dart';

CREATE TABLE IF NOT EXISTS one_tap_login_table (
   id INTEGER PRIMARY KEY AUTOINCREMENT,
   email TEXT, 
   password TEXT, 
   fullName TEXT,
   avatar_image_local_path TEXT,
   last_logged_in_auth_type ENUM(AuthType)
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants