atsign-foundation/at_tools

Breaking change in NotifyVerbBuilder

Closed this issue · 2 comments

gkc commented

Describe the bug
New instance variable 'id' in NotifyVerbBuilder is not being initialized with a default value. As a result, at_client package will encounter a LateInitializationError

To Reproduce
See functional tests output in https://github.com/atsign-foundation/at_client_sdk/runs/5996172479?check_suite_focus=true

LateInitializationError: Field 'id' has not been initialized.
  package:at_commons/src/verb/notify_verb_builder.dart                 NotifyVerbBuilder.id
  package:at_commons/src/verb/notify_verb_builder.dart 64:31           NotifyVerbBuilder.buildCommand
  package:at_lookup/src/at_lookup_impl.dart 367:29                     AtLookupImpl._notify
  package:at_lookup/src/at_lookup_impl.dart 308:28                     AtLookupImpl.executeVerb
  package:at_client/src/client/remote_secondary.dart 36:35             RemoteSecondary.executeVerb
  package:at_client/src/client/at_client_impl.dart 784:40              AtClientImpl.notifyChange
  ===== asynchronous gap ===========================
  package:at_client/src/service/notification_service_impl.dart 180:24  NotificationServiceImpl.notify
  ===== asynchronous gap ===========================
  test/atclient_notify_test.dart 31:18                                 main.<fn>

Expected behavior
NotifyVerbBuilder should set a default value for the 'id' instance variable (generate a uuid). The calling code should be able to subsequently override it if they wish to.

gkc commented

I changed the relevant at_client dependencies back to fixed versions so I could publish at_client 3.0.17. I'd like to get a new at_commons published which makes the changes non-breaking. (Easy to test in an at_client branch which just has a pubspec.yaml with 'any after' rather than fixed dependencies)

gkc commented

There is a dependency here on the server of course ... which server PR has the server changes?