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

Circular Dependencies #224

Closed
heizusan opened this issue Feb 7, 2023 · 0 comments
Closed

Circular Dependencies #224

heizusan opened this issue Feb 7, 2023 · 0 comments

Comments

@heizusan
Copy link

heizusan commented Feb 7, 2023

DEVELOPMENT BRANCH: This is a very low priority/tech debt issue, but can create performance, compile, and other issues that become more difficult to resolve over time.

Running: npx madge --circular --extensions ts ./ returns:

× Found 29 circular dependencies!

1) core/gridDB/GridOffsets.ts > core/gridDB/useHeadings.ts
2) core/gridDB/Sheet.ts > core/gridDB/GridBorders.ts > core/gridDB/GridOffsets.ts > core/gridDB/useHeadings.ts
3) core/gridDB/GridSparse.ts > core/gridDB/CellRectangle.ts
4) core/gridGL/pixiApp/PixiApp.ts > core/gridGL/UI/AxesLines.ts
5) core/gridGL/pixiApp/PixiApp.ts > core/gridGL/UI/Cursor.ts
6) core/gridGL/pixiApp/PixiApp.ts > core/gridGL/UI/GridLines.ts
7) core/gridGL/pixiApp/PixiApp.ts > core/gridGL/UI/cells/Cells.ts > core/gridGL/UI/cells/CellsArray.ts
8) core/gridGL/UI/cells/Cells.ts > core/gridGL/UI/cells/CellsBorder.ts
9) core/gridGL/pixiApp/PixiApp.ts > core/gridGL/UI/cells/Cells.ts > core/gridGL/UI/cells/CellsBorder.ts
10) core/gridGL/UI/cells/Cells.ts > core/gridGL/UI/cells/cellsBackground.ts
11) core/gridGL/pixiApp/PixiApp.ts > core/gridGL/UI/cells/Cells.ts
12) core/gridGL/UI/gridHeadings/GridHeadings.ts > core/gridGL/UI/gridHeadings/GridHeadingsLabels.ts
13) core/gridGL/pixiApp/PixiApp.ts > core/gridGL/UI/gridHeadings/GridHeadings.ts > core/gridGL/UI/gridHeadings/GridHeadingsLabels.ts
14) core/gridGL/pixiApp/PixiApp.ts > core/gridGL/UI/gridHeadings/GridHeadings.ts
15) core/gridGL/pixiApp/PixiApp.ts > core/gridGL/interaction/pointer/Pointer.ts > core/gridGL/interaction/pointer/PointerDown.ts > core/gridGL/interaction/pointer/doubleClickCell.ts
16) core/gridGL/pixiApp/PixiApp.ts > core/gridGL/interaction/pointer/Pointer.ts > core/gridGL/interaction/pointer/PointerDown.ts
17) core/gridGL/pixiApp/PixiApp.ts > core/gridGL/interaction/pointer/Pointer.ts > core/gridGL/interaction/pointer/PointerHeading.ts
18) core/gridGL/pixiApp/PixiApp.ts > core/gridGL/interaction/pointer/Pointer.ts
19) core/gridGL/pixiApp/PixiApp.ts > core/gridGL/pixiApp/PixiAppSettings.ts
20) core/gridGL/pixiApp/PixiApp.ts > core/gridGL/pixiApp/Update.ts > core/gridGL/helpers/debugPerformance.ts
21) core/gridGL/pixiApp/PixiApp.ts > core/gridGL/pixiApp/Update.ts
22) core/gridGL/pixiApp/PixiApp.ts > core/gridGL/quadrants/Quadrants.ts
23) core/gridGL/pixiApp/PixiApp.ts > core/gridGL/quadrants/Quadrants.ts > core/gridGL/quadrants/Quadrant.ts
24) core/gridGL/pixiApp/PixiApp.ts > core/transaction/sheetController.ts
25) core/gridGL/pixiApp/PixiApp.ts > core/transaction/sheetController.ts > core/transaction/runners/runner.ts
26) core/gridGL/pixiApp/PixiApp.ts > core/transaction/sheetController.ts > core/transaction/runners/runner.ts > core/transaction/runners/setBorderRunner.ts
27) core/gridGL/pixiApp/PixiApp.ts > core/transaction/sheetController.ts > core/transaction/runners/runner.ts > core/transaction/runners/setCellFormatRunner.ts
28) core/gridGL/pixiApp/PixiApp.ts > core/transaction/sheetController.ts > core/transaction/runners/runner.ts > core/transaction/runners/setCellRunner.ts
29) core/gridGL/pixiApp/PixiApp.ts > core/transaction/sheetController.ts > core/transaction/runners/runner.ts > core/transaction/runners/setHeadingSizeRunner.ts

Some of these dependencies - like #2 - are easier to resolve, by, e.g., moving typedefs and simple interfaces (i.e. ones that only define scalar type fields like numbers and booleans) into their own files/packages. Other dependencies may require larger refactors.

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

No branches or pull requests

3 participants