ecency-mobile icon indicating copy to clipboard operation
ecency-mobile copied to clipboard

Refractor: fix all Require Cycle warnings

Open aliseyalvi opened this issue 2 years ago • 3 comments

need to find easy way to remove these warnings or at least limit or hide these warnings

  • [x] since js allow required cycle, for now, ignore warnings to avoid warnings flood
  • [ ] fix require cycle issue with proper structuring.

aliseyalvi avatar Sep 15 '22 11:09 aliseyalvi

@noumantahir I had tried to fix the require cycle but it would require lot of careful refactoring to fix these warnings. Most of the issue are coming from components imports inside other exported components causing require cycles. These can be fixed by placing appropriate folders into different respective folders, like small components into atoms and large components into molecules because molecules reuse the atoms which are main reason of require cycles.
As these warnings are not major issue so we can igone these warnings or can add into whitelist of console logbox. Let me know your thoughts

aliseyalvi avatar Sep 25 '22 17:09 aliseyalvi

@aliseyalvi yes we should for now add them into whitelist as these require cycles have existing from the start and should not cause serious problems for use.

However we should also create cards for refactoring component directories, as I do believer it may be allowed but must be cause some performance roadblocks for app to run or startup etc

@feruzm what would be your suggestion here...?

noumantahir avatar Sep 25 '22 17:09 noumantahir

@aliseyalvi yes we should for now add them into whitelist as these require cycles have existing from the start and should not cause serious problems for use.

However we should also create cards for refactoring component directories, as I do believer it may be allowed but must be cause some performance roadblocks for app to run or startup etc

@feruzm what would be your suggestion here...?

@noumantahir you are right at some point these require cycle can cause problems espacially when there is code dependency but as I suggested it can't be done in a single PR. It requires lot of refactoring and we have to do one by one

aliseyalvi avatar Sep 25 '22 17:09 aliseyalvi