circular dependency #5521
Replies: 3 comments
-
Yes. It makes it so we can do things like this (in packages/util/sync/editor/generic/util.ts): import { cmp_array } from "@cocalc/util/misc"; anywhere in the codebase, in other modules and also directly in this module. This is often better than doing relative importants like this, which are error prone and have be changed when a file is moved: import {cmp_array} from "../../../misc"; I know it is also possible (https://www.typescriptlang.org/tsconfig#baseUrl) for typescript code to use the baseUrl option in tsconfig.json to accomplish something similar though less robust, across a monorepo. |
Beta Was this translation helpful? Give feedback.
-
One other comment is that the CoCalc assumes you're using a recent version of npm, and definitely doesn't support yarn or npm <= 6.x |
Beta Was this translation helpful? Give feedback.
-
I've eliminated these circular dependencies. 5b2a6ee |
Beta Was this translation helpful? Give feedback.
-
Is this circular dependency needed?
cocalc/src/packages/util/package.json
Line 32 in 154d215
Beta Was this translation helpful? Give feedback.
All reactions