Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

♻️ migrate codebase to nullsafety #548

Merged
merged 12 commits into from
Jan 5, 2022

Conversation

jozsefsallai
Copy link
Member

@jozsefsallai jozsefsallai commented Jun 26, 2021

This was/is a mostly manual migration*, so it's very likely that there are bugs here and there, but overall the migration is complete, now it's time for testing. I'm still testing as many features of the app as possible, to make sure everything works as intended. So far, apart from some smaller issues I've noticed, everything works fine. If you want to help debug things, you can build the app yourself report bugs back to me.

Sometimes there's some lag going on in the debug build** but that might be because it's not optimized and has a lot of debug symbols left in, which makes it slower.

When building the app, you have to use the --no-sound-null-safety flag for now, as some libraries are not yet migrated to support nullsafety (such as the OneSignal SDK). The vscode build tasks include this flag by default.

*) I tried using the Dart migration tool but I couldn't get it to work at all. Also, I preferred to have this be manual for the most part, since trusting machines to automagically migrate such a large codebase is not necessarily a good idea because it could result in lots of debugging.

**) Haven't used the production build more thoroughly just yet.

P.S.: the oldest (largest) commit was originally split into multiple smaller commits, but I rebased it so it's all clean and tidy :)

Relevant issue: #546

Todo list

  • app ignores link preview preferences until you change them
  • images in link previews don't show up (weird because it used to work)
  • onesignal_flutter was migrated over, we can upgrade it
  • clicking on a community from hashtag search (probably other post streams) displays a nullcheck operator error for a second, then it displays the community
  • overflow error in user stream: https://i.imgur.com/1Y6OzCF.png
  • default profile pic doesn't show up in community (if a user has no profile pic): https://i.imgur.com/bLJ3Aq9.png
  • adding administrator displays "Unknown error" but adds the admin anyway (moderators and blocked users don't have this issue)
  • this very questionable overflow: https://i.imgur.com/fiqv7jM.jpg (we can prooooobably ignore this)
  • tapping on "new circle" in the "add user to connections" bottom sheet results in this error (lists don't have this issue and the new circle modal works when opened from the menu): https://i.imgur.com/XwekOvk.jpg

- adding administrator displays "Unknown error" but adds the admin anyway
- default profile pic doesn't show up in community
. tapping on "new circle" in the "add user to connections" bottom sheet results in exception
@jozsefsallai
Copy link
Member Author

If you'd like to help testing the app post-migration but don't want to build it yourself, you can use the following APK: https://s3-us-west-1.amazonaws.com/sallai/app-production-debug.apk (I don't have an iOS device, so I can't provide with an iOS build, sorry) 🎉

@jozsefsallai
Copy link
Member Author

Uploaded a new apk with all of the bugs from the initial todo list fixed. The download link should be the same.

@jozsefsallai jozsefsallai marked this pull request as ready for review July 6, 2021 12:49
@vituocgia
Copy link

Good job man! I'm going to test on the iOS now...

@jozsefsallai
Copy link
Member Author

Thanks @vituocgia! Lemme know if you've encountered any bugs!

- updated dependencies to the newest non-breaking version
- fixed android build compatibility issues
- fixed compatibility issues with Flutter 2.5
@lifenautjoe lifenautjoe merged commit c4de672 into OkunaOrg:develop Jan 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants