atsign-foundation/at_tools

at_cli broken by changes to at_persistence_secondary_server (and other dependencies)

Closed this issue · 0 comments

Describe the bug
I can't compile at_cli due to a large number of issues:

$ dart compile exe bin/main.dart -o ~/at_cli

Info: Compiling with sound null safety
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_secondary_server-2.0.6/lib/src/compaction/at_size_based_compaction.dart:14:8: Error: The return type of the method 'SizeBasedCompaction.performCompaction' is 'void', which does not match the return type, 'Future<void>', of the overridden method, 'AtCompactionStrategy.performCompaction'.
 - 'Future' is from 'dart:async'.
Change to a subtype of 'Future<void>'.
  void performCompaction(AtLogType atLogType) {
       ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_spec-2.0.3/lib/src/compaction/at_compaction_strategy.dart:30:16: Context: This is the overridden method ('performCompaction').
  Future<void> performCompaction(AtLogType atLogType);
               ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_secondary_server-2.0.6/lib/src/compaction/at_time_based_compaction.dart:14:8: Error: The return type of the method 'TimeBasedCompaction.performCompaction' is 'void', which does not match the return type, 'Future<void>', of the overridden method, 'AtCompactionStrategy.performCompaction'.
 - 'Future' is from 'dart:async'.
Change to a subtype of 'Future<void>'.
  void performCompaction(AtLogType atLogType) {
       ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_spec-2.0.3/lib/src/compaction/at_compaction_strategy.dart:30:16: Context: This is the overridden method ('performCompaction').
  Future<void> performCompaction(AtLogType atLogType);
               ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_secondary_server-2.0.6/lib/src/compaction/at_time_based_compaction.dart:17:21: Error: The getter 'isEmpty' isn't defined for the class 'Future<List<dynamic>>'.
 - 'Future' is from 'dart:async'.
 - 'List' is from 'dart:core'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'isEmpty'.
    if (expiredKeys.isEmpty) {
                    ^^^^^^^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_secondary_server-2.0.6/lib/src/keystore/hive_keystore.dart:14:7: Error: The non-abstract class 'HiveKeystore' is missing implementations for these members:
 - SecondaryKeyStore.isKeyExists
Try to either
 - provide an implementation,
 - inherit an implementation from a superclass or mixin,
 - mark the class as abstract, or
 - provide a 'noSuchMethod' implementation.

class HiveKeystore implements SecondaryKeyStore<String, AtData?, AtMetaData?> {
      ^^^^^^^^^^^^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_spec-2.0.3/lib/src/keystore/secondary_keystore.dart:19:8: Context: 'SecondaryKeyStore.isKeyExists' is defined here.
  bool isKeyExists(String key);
       ^^^^^^^^^^^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_secondary_server-2.0.6/lib/src/keystore/hive_keystore.dart:191:8: Error: The return type of the method 'HiveKeystore.deleteExpiredKeys' is 'bool', which does not match the return type, 'Future<bool>', of the overridden method, 'SecondaryKeyStore.deleteExpiredKeys'.
 - 'Future' is from 'dart:async'.
Change to a subtype of 'Future<bool>'.
  bool deleteExpiredKeys() {
       ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_spec-2.0.3/lib/src/keystore/secondary_keystore.dart:10:16: Context: This is the overridden method ('deleteExpiredKeys').
  Future<bool> deleteExpiredKeys();
               ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_secondary_server-2.0.6/lib/src/keystore/hive_keystore.dart:215:16: Error: The return type of the method 'HiveKeystore.getExpiredKeys' is 'List<String>', which does not match the return type, 'Future<List<String>>', of the overridden method, 'SecondaryKeyStore.getExpiredKeys'.
 - 'List' is from 'dart:core'.
 - 'Future' is from 'dart:async'.
Change to a subtype of 'Future<List<String>>'.
  List<String> getExpiredKeys() {
               ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_spec-2.0.3/lib/src/keystore/secondary_keystore.dart:7:19: Context: This is the overridden method ('getExpiredKeys').
  Future<List<K>> getExpiredKeys();
                  ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_secondary_server-2.0.6/lib/src/log/accesslog/access_log_keystore.dart:93:17: Error: The return type of the method 'AccessLogKeyStore.getExpired' is 'List<dynamic>', which does not match the return type, 'Future<List<dynamic>>', of the overridden method, 'LogKeyStore.getExpired'.
 - 'List' is from 'dart:core'.
 - 'Future' is from 'dart:async'.
Change to a subtype of 'Future<List<dynamic>>'.
  List<dynamic> getExpired(int expiryInDays) {
                ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_spec-2.0.3/lib/src/keystore/log_keystore.dart:43:25: Context: This is the overridden method ('getExpired').
  Future<List<dynamic>> getExpired(int expiryInDays);
                        ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_secondary_server-2.0.6/lib/src/log/accesslog/at_access_log.dart:56:17: Error: The return type of the method 'AtAccessLog.getExpired' is 'List<dynamic>', which does not match the return type, 'Future<List<dynamic>>', of the overridden method, 'AtLogType.getExpired'.
 - 'List' is from 'dart:core'.
 - 'Future' is from 'dart:async'.
Change to a subtype of 'Future<List<dynamic>>'.
  List<dynamic> getExpired(int expiryInDays) {
                ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_spec-2.0.3/lib/src/compaction/at_compaction_strategy.dart:19:25: Context: This is the overridden method ('getExpired').
  Future<List<dynamic>> getExpired(int expiryInDays);
                        ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_secondary_server-2.0.6/lib/src/log/accesslog/at_access_log.dart:61:8: Error: The return type of the method 'AtAccessLog.delete' is 'void', which does not match the return type, 'Future<void>', of the overridden method, 'AtLogType.delete'.
 - 'Future' is from 'dart:async'.
Change to a subtype of 'Future<void>'.
  void delete(expiredKeys) {
       ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_spec-2.0.3/lib/src/compaction/at_compaction_strategy.dart:14:16: Context: This is the overridden method ('delete').
  Future<void> delete(dynamic expiredKeys);
               ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_secondary_server-2.0.6/lib/src/log/accesslog/at_access_log.dart:71:8: Error: The return type of the method 'AtAccessLog.getFirstNEntries' is 'List<dynamic>', which does not match the return type, 'Future<List<dynamic>>', of the overridden method, 'AtLogType.getFirstNEntries'.
 - 'List' is from 'dart:core'.
 - 'Future' is from 'dart:async'.
Change to a subtype of 'Future<List<dynamic>>'.
  List getFirstNEntries(int N) {
       ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_spec-2.0.3/lib/src/compaction/at_compaction_strategy.dart:10:16: Context: This is the overridden method ('getFirstNEntries').
  Future<List> getFirstNEntries(int N);
               ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_secondary_server-2.0.6/lib/src/log/commitlog/at_commit_log.dart:85:17: Error: The return type of the method 'AtCommitLog.getExpired' is 'List<dynamic>', which does not match the return type, 'Future<List<dynamic>>', of the overridden method, 'AtLogType.getExpired'.
 - 'List' is from 'dart:core'.
 - 'Future' is from 'dart:async'.
Change to a subtype of 'Future<List<dynamic>>'.
  List<dynamic> getExpired(int expiryInDays) {
                ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_spec-2.0.3/lib/src/compaction/at_compaction_strategy.dart:19:25: Context: This is the overridden method ('getExpired').
  Future<List<dynamic>> getExpired(int expiryInDays);
                        ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_secondary_server-2.0.6/lib/src/log/commitlog/at_commit_log.dart:123:8: Error: The return type of the method 'AtCommitLog.getFirstNEntries' is 'List<dynamic>', which does not match the return type, 'Future<List<dynamic>>', of the overridden method, 'AtLogType.getFirstNEntries'.
 - 'List' is from 'dart:core'.
 - 'Future' is from 'dart:async'.
Change to a subtype of 'Future<List<dynamic>>'.
  List getFirstNEntries(int N) {
       ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_spec-2.0.3/lib/src/compaction/at_compaction_strategy.dart:10:16: Context: This is the overridden method ('getFirstNEntries').
  Future<List> getFirstNEntries(int N);
               ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_secondary_server-2.0.6/lib/src/log/commitlog/at_commit_log.dart:140:8: Error: The return type of the method 'AtCommitLog.delete' is 'void', which does not match the return type, 'Future<void>', of the overridden method, 'AtLogType.delete'.
 - 'Future' is from 'dart:async'.
Change to a subtype of 'Future<void>'.
  void delete(dynamic expiredKeys) {
       ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_spec-2.0.3/lib/src/compaction/at_compaction_strategy.dart:14:16: Context: This is the overridden method ('delete').
  Future<void> delete(dynamic expiredKeys);
               ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_secondary_server-2.0.6/lib/src/log/commitlog/commit_log_keystore.dart:198:8: Error: The return type of the method 'CommitLogKeyStore.getExpired' is 'List<dynamic>', which does not match the return type, 'Future<List<dynamic>>', of the overridden method, 'LogKeyStore.getExpired'.
 - 'List' is from 'dart:core'.
 - 'Future' is from 'dart:async'.
Change to a subtype of 'Future<List<dynamic>>'.
  List getExpired(int expiryInDays) {
       ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_spec-2.0.3/lib/src/keystore/log_keystore.dart:43:25: Context: This is the overridden method ('getExpired').
  Future<List<dynamic>> getExpired(int expiryInDays);
                        ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_secondary_server-2.0.6/lib/src/notification/at_notification_keystore.dart:8:7: Error: The non-abstract class 'AtNotificationKeystore' is missing implementations for these members:
 - SecondaryKeyStore.isKeyExists
Try to either
 - provide an implementation,
 - inherit an implementation from a superclass or mixin,
 - mark the class as abstract, or
 - provide a 'noSuchMethod' implementation.

class AtNotificationKeystore implements SecondaryKeyStore {
      ^^^^^^^^^^^^^^^^^^^^^^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_spec-2.0.3/lib/src/keystore/secondary_keystore.dart:19:8: Context: 'SecondaryKeyStore.isKeyExists' is defined here.
  bool isKeyExists(String key);
       ^^^^^^^^^^^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_secondary_server-2.0.6/lib/src/notification/at_notification_keystore.dart:84:8: Error: The return type of the method 'AtNotificationKeystore.deleteExpiredKeys' is 'bool', which does not match the return type, 'Future<bool>', of the overridden method, 'SecondaryKeyStore.deleteExpiredKeys'.
 - 'Future' is from 'dart:async'.
Change to a subtype of 'Future<bool>'.
  bool deleteExpiredKeys() {
       ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_spec-2.0.3/lib/src/keystore/secondary_keystore.dart:10:16: Context: This is the overridden method ('deleteExpiredKeys').
  Future<bool> deleteExpiredKeys();
               ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_secondary_server-2.0.6/lib/src/notification/at_notification_keystore.dart:89:8: Error: The return type of the method 'AtNotificationKeystore.getExpiredKeys' is 'List<dynamic>', which does not match the return type, 'Future<List<dynamic>>', of the overridden method, 'SecondaryKeyStore.getExpiredKeys'.
 - 'List' is from 'dart:core'.
 - 'Future' is from 'dart:async'.
Change to a subtype of 'Future<List<dynamic>>'.
  List getExpiredKeys() {
       ^
../../../../../.pub-cache/hosted/pub.dartlang.org/at_persistence_spec-2.0.3/lib/src/keystore/secondary_keystore.dart:7:19: Context: This is the overridden method ('getExpiredKeys').
  Future<List<K>> getExpiredKeys();
                  ^
Error: AOT compilation failed
Generating AOT kernel dill failed!

To Reproduce
Steps to reproduce the behavior:

  1. First I cloned this repo
  2. Then I cd at_tools\at_cli
  3. And then dart compile exe bin/main.dart -o ~/at_cli

Expected behavior
at_cli compiles to create a native binary

Additional context
Blocker for using at_cli on a Raspberry Pi to build elements of MWC demo.