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

fix: abstract out circular dependencies between engine and networks util #12372

Merged
merged 9 commits into from
Dec 4, 2024

Conversation

tommasini
Copy link
Contributor

@tommasini tommasini commented Nov 21, 2024

Description

  • Added dpdm to measure circular dependencies: https://github.com/acrazing/dpdm
  • Fixed circular dependencies between engine -> network/utils
  • Add script using dpdm to package json circular:deps

This still have circular deps between the new engineNetworkUtils and Engine, they will be a follow up discussion, since the code in Engine might not be needed anymore

PR - https://www.notion.so/metamask-consensys/Remove-all-circular-dependencies-in-the-codebase-30-in-total-to-enable-HMR-and-React-Refresh-Mo-02737ed3b49c4702b8cb55fdb67020e8

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@tommasini tommasini added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) Run Smoke E2E Triggers smoke e2e on Bitrise team-tiger Tiger team (for tech debt reduction + performance improvements) labels Nov 21, 2024
@tommasini tommasini requested review from a team as code owners November 21, 2024 15:19
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-mobile-platform Mobile Platform team label Nov 21, 2024
Copy link
Contributor

https://bitrise.io/ Bitrise

🔄🔄🔄 pr_smoke_e2e_pipeline started on Bitrise...🔄🔄🔄

Commit hash: f203529
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/fd2e94b1-6492-4c33-8c4d-b8e6d1648db9

Note

  • This comment will auto-update when build completes
  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Copy link

socket-security bot commented Nov 21, 2024

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/dpdm@3.14.0 filesystem, unsafe 0 265 kB acrazing

View full report↗︎

@tommasini tommasini added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 21, 2024
Copy link
Contributor

https://bitrise.io/ Bitrise

🔄🔄🔄 pr_smoke_e2e_pipeline started on Bitrise...🔄🔄🔄

Commit hash: 5520788
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/c80fbb88-d61f-4396-970a-bd217d8a3e9c

Note

  • This comment will auto-update when build completes
  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@wachunei
Copy link
Member

awesome!

I suggest adding this to the description https://www.notion.so/metamask-consensys/Remove-all-circular-dependencies-in-the-codebase-30-in-total-to-enable-HMR-and-React-Refresh-Mo-02737ed3b49c4702b8cb55fdb67020e8.

hey @gauthierpetetin, do you know there's a mobile specific ticket for this?

@MarioAslau MarioAslau added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 21, 2024
Copy link
Contributor

github-actions bot commented Nov 21, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 616629b
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/4212ecfa-d721-444b-9fee-82604002ff4c

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@tommasini
Copy link
Contributor Author

@wachunei there is not yet! but there will be a ticket for this soon! I will send to you, when I create, just trying to understand the best strategy to address those and getting my hands on it on the way :p

@Cal-L Cal-L changed the title fix: circular dependencies between engine and networks util fix: abstract out circular dependencies between engine and networks util Nov 21, 2024
Cal-L
Cal-L previously approved these changes Nov 21, 2024
Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

LGTM

@tommasini tommasini added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 29, 2024
Copy link
Contributor

github-actions bot commented Nov 29, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 7b4acc9
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/9242ba8a-8af9-48b1-8ebd-9ee29f8ba285

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@tommasini tommasini added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 29, 2024
@tommasini tommasini added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Dec 2, 2024
Copy link
Contributor

github-actions bot commented Dec 2, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: b0271a8
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/e31a7f38-495b-4608-9bc3-ca09857029d6

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@tommasini tommasini added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Dec 3, 2024
Copy link
Contributor

github-actions bot commented Dec 3, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 86aba01
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/0532ebf9-de84-4e1f-983a-4c344bcaa828

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Copy link

sonarqubecloud bot commented Dec 3, 2024

@EtherWizard33 EtherWizard33 self-requested a review December 3, 2024 12:35
Copy link
Contributor

@EtherWizard33 EtherWizard33 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

Lgtm

@tommasini tommasini enabled auto-merge December 3, 2024 19:13
@tommasini tommasini added this pull request to the merge queue Dec 4, 2024
Merged via the queue into main with commit 8bcf0a7 Dec 4, 2024
43 checks passed
@tommasini tommasini deleted the fix/circular-deps-networks-engine branch December 4, 2024 09:05
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Dec 4, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2024
@metamaskbot metamaskbot added the release-7.38.0 Issue or pull request that will be included in release 7.38.0 label Dec 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.38.0 Issue or pull request that will be included in release 7.38.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-mobile-platform Mobile Platform team team-tiger Tiger team (for tech debt reduction + performance improvements)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

8 participants