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

[No QA] Fix dependency cycles #6266

Merged
merged 12 commits into from
Nov 23, 2021
Merged

[No QA] Fix dependency cycles #6266

merged 12 commits into from
Nov 23, 2021

Conversation

marcaaron
Copy link
Contributor

@marcaaron marcaaron commented Nov 8, 2021

Details

Most of the dependency cycles were added when a change was made to log from within HttpUtils which is pretty low level. My solution for this was to basically just move those logs out of there and into API. API also had a dependency cycle with Log but by moving the API.Log command into the file where Log is initialized instead we can avoid this.

One other step taken here was to simplify the practice of "setting callbacks". Since there are many places where we have a pattern of avoiding dependency cycles by injecting callbacks from outside a module. This works fine, but is a little tedious so I added a utility that works like this:

const [someCallback, registerSomeCallback, cancelSomeCallback] = createCallback();

Fixed Issues

$ #6251

Tests

QA Steps

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Mobile Web

Desktop

iOS

Android

@marcaaron marcaaron self-assigned this Nov 8, 2021
Copy link
Contributor

@roryabraham roryabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall looks pretty good, just had one comment.

@marcaaron marcaaron marked this pull request as ready for review November 9, 2021 14:53
@marcaaron marcaaron requested a review from a team as a code owner November 9, 2021 14:53
@MelvinBot MelvinBot requested review from ctkochan22 and removed request for a team November 9, 2021 14:53
@marcaaron marcaaron changed the title [No QA] Fix dependency cycles [HOLD 11/19][No QA] Fix dependency cycles Nov 12, 2021
@marcaaron marcaaron changed the title [HOLD 11/19][No QA] Fix dependency cycles [No QA] Fix dependency cycles Nov 22, 2021
@marcaaron
Copy link
Contributor Author

Taking these changes off HOLD now that I am back from OOO

Almost done with these JS style issues and want to wrap them up before we all start moving to higher priority things :) 🚀

Copy link
Contributor

@roryabraham roryabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@marcaaron marcaaron merged commit 0dfdf36 into main Nov 23, 2021
@marcaaron marcaaron deleted the marcaaron-fixLogDependency branch November 23, 2021 17:03
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @marcaaron in version: 1.1.16-11 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

OSBotify commented Dec 6, 2021

🚀 Deployed to production by @roryabraham in version: 1.1.17-7 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

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

Successfully merging this pull request may close these issues.

4 participants