Skip to content
New issue

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

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

Already on GitHub? # to your account

Release/1.0.22 #193

Merged
merged 14 commits into from
Jun 11, 2019
Merged

Release/1.0.22 #193

merged 14 commits into from
Jun 11, 2019

Conversation

phillwiggins
Copy link
Member

@RodrigoSMarques
@yulingtianxia

I have merged master (as people have been committing work there), to the latest release branch. Please can you (if your free and available) test the latest version and ensure everything is working.

From my project, nearly everything is looking okay. Couple of small bugs but something that shouldn't affect production code for any other users.

phillwiggins and others added 14 commits March 24, 2019 19:31
# Conflicts:
#	CHANGELOG.md
#	README.md
#	example/lib/data/base/api_response.dart
#	example/lib/data/repositories/diet_plan/provider_api_diet_plan.dart
#	example/lib/data/repositories/diet_plan/provider_db_diet_plan.dart
#	example/lib/data/repositories/diet_plan/repository_diet_plan.dart
#	example/lib/ui/main.dart
#	example/test/data/repository/diet_plan/repository_diet_plan_api_test.dart
#	example/test/data/repository/diet_plan/repository_diet_plan_db_test.dart
#	example/test/data/repository/diet_plan/repository_diet_plan_test.dart
#	example/test/data/repository/repository_mock_utils.dart
#	lib/src/base/parse_constants.dart
…orage (#166) (#167)

implement default local store using sembast and with encryption using XXTEA algorithm

add desktop support in example project
* create CoreStore interface to allow different implements for local storage (#166)

implement default local store using sembast and with encryption using XXTEA algorithm

add desktop support in example project

* make parse shared preferences default store (#168)

* add decion page to detect parse server availability
throw execption if server url is empty
navigate to correct page base on current user state

* working on example

throw exception if sever url is empty 
add decision page to check availability of parse server

 navigate to screen base on current user state

* create example flow for login and #
display list of diet plan items and allow to remove and update it's status

* add shared preferences corestore
fix bug when create custom corestore implementation

* use shared shared preferences in example

* make parse shared preferences default store

* Update application_constants.dart

* README.md updated from https://stackedit.io/

* Support Relation.

* delete vscode config

* Update .gitignore
* Fix Commit: 6ed26e1

* Update parse_encoder.dart

Fix parse encoder bug.

* Fix exception when sendSessionId is null.

* delete toJson calling.
* Fix Commit: 6ed26e1

* Update parse_encoder.dart

Fix parse encoder bug.

* Fix exception when sendSessionId is null.

* 1. Support save objects recursively.
2. Fix encoding for Add and Remove operations.
3. Fix some exceptions.
4. Support batch request and handle response.
* Implemented querying for related objects defined based on a field of type Relation

* Implemented unit test for relatedTo query
@RodrigoSMarques
Copy link
Contributor

RodrigoSMarques commented Jun 10, 2019

Hi @phillwiggins
My project does not run. Problem persists on sembast.
I did not change to sembast. I continue using SharedPreferences (default) PR #168
I deleted the github cache, deleted the build folder, deleted the app on the device.

  parse_server_sdk:
    git: 
      url: https://github.com/phillwiggins/flutter_parse_sdk.git
      ref: release/1.0.22
--------------------------------------------------------------------

Launching lib/main.dart on iPhone Xʀ in debug mode...
Xcode build done.                                           16,6s
[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: NoSuchMethodError: The getter 'length' was called on null.
Receiver: null
Tried calling: length
#0      Object.noSuchMethod  (dart:core-patch/object_patch.dart:50:5)
#1      XXTEA._fixkey
#2      XXTEA.encrypt
#3      XXTEA.encryptToString
#4      _XXTeaEncoder.convert
#5      Codec.encode  (dart:convert/codec.dart:21:32)
#6      getCodecEncodedSignature
#7      SembastDatabase.open.<anonymous closure>._openDone
<asynchronous suspension>
#8      SembastDatabase.open.<anonymous closure>
<asynchronous suspension>
#9      BasicLock.synchronized
<asynchronous suspension>
#10     SembastDatabase.open (p<>

@WahdanZ
Copy link
Contributor

WahdanZ commented Jun 10, 2019

I have some comments, now we will make sembast the default storage I think it will be okay
but when I implemented it the first time I used the master key as the encryption key and I modified this in the next PR and make the appID to be the encryption key when we make sharedprefrances as the default implementation
you can see the PR here #168
also, I did some modification to make it's easy to change the implementation of local storage

@RodrigoSMarques
Copy link
Contributor

RodrigoSMarques commented Jun 10, 2019

Hi @WahdanZ
changing the sembast to default, what will happen to the applications that store the information in the SharedPreference?
What is the plan for the developer to switch from SharedPreference to Sembast. There are applications in production today. How will the data be taken from one storage to another?

This change breaks applications. This is the point.

@WahdanZ
Copy link
Contributor

WahdanZ commented Jun 10, 2019

yes I understand that and that's why I make SharedPreference it the default one

@RodrigoSMarques
Copy link
Contributor

Ok @WahdanZ.
I have not had time to examine the code, but it does not seem that SharedPreference is by default. The error message is related to Sebast.

@WahdanZ
Copy link
Contributor

WahdanZ commented Jun 10, 2019

yes because there are some comments ignored
#168

@phillwiggins
Copy link
Member Author

phillwiggins commented Jun 11, 2019 via email

@phillwiggins phillwiggins merged commit 130121e into master Jun 11, 2019
@RodrigoSMarques
Copy link
Contributor

Ok @phillwiggins
This can be used. My point is that SharedPreference exists from the beginning. There are applications in production using.
Using sembast by default, we can break apps and an inattentive developer does not realize this change.
The lib documentation has to be improved at this point.
Before making this kind of change, I suggest always mark it as @deprecated.

@phillwiggins
Copy link
Member Author

@RodrigoSMarques

I agree that it will cause issues if a developer doesn't notice that this has changed. I don't think @depreciated is necessary as SharedPreferences is a valid option for storage. I think that we set the default as SharedPreferences and leave the option open to developers.

@RodrigoSMarques
Copy link
Contributor

RodrigoSMarques commented Jun 11, 2019

@phillwiggins

Exactly. I understood that this was what they had defined e done here #168 by @WahdanZ

#167 (comment)

@phillwiggins
Copy link
Member Author

phillwiggins commented Jun 11, 2019 via email

@RodrigoSMarques
Copy link
Contributor

RodrigoSMarques commented Jun 11, 2019

@phillwiggins
Have you done any merge? It was not working for me.
I deleted the github cache, deleted the build folder, deleted the app on the device.
I can try again

  parse_server_sdk:
    git: 
      url: https://github.com/phillwiggins/flutter_parse_sdk.git
      ref: release/1.0.22
--------------------------------------------------------------------

Launching lib/main.dart on iPhone Xʀ in debug mode...
Xcode build done.                                           16,6s
[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: NoSuchMethodError: The getter 'length' was called on null.
Receiver: null
Tried calling: length
#0      Object.noSuchMethod  (dart:core-patch/object_patch.dart:50:5)
#1      XXTEA._fixkey
#2      XXTEA.encrypt
#3      XXTEA.encryptToString
#4      _XXTeaEncoder.convert
#5      Codec.encode  (dart:convert/codec.dart:21:32)
#6      getCodecEncodedSignature
#7      SembastDatabase.open.<anonymous closure>._openDone
<asynchronous suspension>
#8      SembastDatabase.open.<anonymous closure>
<asynchronous suspension>
#9      BasicLock.synchronized
<asynchronous suspension>
#10     SembastDatabase.open (p<>

@phillwiggins
Copy link
Member Author

phillwiggins commented Jun 11, 2019 via email

@RodrigoSMarques
Copy link
Contributor

Hi @phillwiggins
Hello phill.
I performed the test and the same error continues.
To make sure that using the correct version, I cleaned the cache of the git's repository in the flutter-cache.
I deleted the app on the device, and I ran flutter clean

  parse_server_sdk:
    git: 
      url: https://github.com/phillwiggins/flutter_parse_sdk.git
      ref: release/1.0.22
-----------
Launching lib/main.dart on iPhone Xʀ in debug mode...
Xcode build done.                                           27,1s
[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: type 'Future<CoreStore>' is not a subtype of type 'CoreStore'
#0      ParseCoreData.init
#1      Parse.initialize
#2      main
#3      _AsyncAwaitCompleter.start  (dart:async-patch/async_patch.dart:49:6)
#4      main
#5      _runMainZoned.<anonymous closure>.<anonymous closure>  (dart:ui/hooks.dart:199:25)
#6      _rootRun  (dart:async/zone.dart:1124:13)
#7      _CustomZone.run  (dart:async/zone.dart:1021:19)
#8      _runZoned  (dart:async/zone.dart:1516:10)
#9      runZoned  (dart:async/zone.dart:1500:12)
#10     _runMainZoned.<anonymous closure>  (dart:ui/hooks.dart:190:5)
#11     _startIsolate.<anonymous closure>  (dart:isolate-patch/isolate_patch.dart:300:19)
#12     _RawReceivePortImpl._handleMessage  (dart:isolate-patch/isolate_patch.dart:171:12)

@phillwiggins
Copy link
Member Author

phillwiggins commented Jun 13, 2019 via email

@phillwiggins
Copy link
Member Author

phillwiggins commented Jun 13, 2019 via email

@WahdanZ
Copy link
Contributor

WahdanZ commented Jun 13, 2019

I faced this problem and I'm going to make PR for it today
also I add an option to Create Parse object without data it will be useful for pointer it's and feature in Parse Android sdk

fischerscode pushed a commit to fischerscode/Parse-SDK-Flutter that referenced this pull request Sep 5, 2020
* Added repo example

* create CoreStore interface to allow different implements for local storage (parse-community#166) (parse-community#167)

implement default local store using sembast and with encryption using XXTEA algorithm

add desktop support in example project

* Lint/Code clean

* Some dart linter fixes (parse-community#171)

* Support Relation (parse-community#179)

* create CoreStore interface to allow different implements for local storage (parse-community#166)

implement default local store using sembast and with encryption using XXTEA algorithm

add desktop support in example project

* make parse shared preferences default store (parse-community#168)

* add decion page to detect parse server availability
throw execption if server url is empty
navigate to correct page base on current user state

* working on example

throw exception if sever url is empty 
add decision page to check availability of parse server

 navigate to screen base on current user state

* create example flow for login and #
display list of diet plan items and allow to remove and update it's status

* add shared preferences corestore
fix bug when create custom corestore implementation

* use shared shared preferences in example

* make parse shared preferences default store

* Update application_constants.dart

* README.md updated from https://stackedit.io/

* Support Relation.

* delete vscode config

* Update .gitignore

* Fix Commit: 6ed26e1 (parse-community#181)

* Delete `toJson` and fix exception. (parse-community#187)

* Fix Commit: 6ed26e1

* Update parse_encoder.dart

Fix parse encoder bug.

* Fix exception when sendSessionId is null.

* delete toJson calling.

* Save recursively (parse-community#190)

* Fix Commit: 6ed26e1

* Update parse_encoder.dart

Fix parse encoder bug.

* Fix exception when sendSessionId is null.

* 1. Support save objects recursively.
2. Fix encoding for Add and Remove operations.
3. Fix some exceptions.
4. Support batch request and handle response.

* Implemented whereRelatedTo query (parse-community#192)

* Implemented querying for related objects defined based on a field of type Relation

* Implemented unit test for relatedTo query

* Release v1.0.22 - Fix CoreStore bug
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants