@@ -16,10 +16,11 @@ import { RushConstants } from './RushConstants';
1616 * A cycle means that pnpm would be unable to install the workspace, so it is better to
1717 * fail fast with a clear message rather than let pnpm produce a cryptic error.
1818 *
19- * The recommended fix is to refactor the code to eliminate the cycle, for example by
20- * extracting shared code into a new package that both projects can depend on, or by
21- * moving code from one project to another. If the cycle truly cannot be broken,
22- * `decoupledLocalDependencies` can be used as a last resort.
19+ * The fix is to refactor the code to eliminate the cycle, for example by extracting shared
20+ * code into a new package that both projects can depend on, or by moving code from one project
21+ * to another. `decoupledLocalDependencies` is intended only for the bootstrapping problem
22+ * (e.g. the version of a compiler used to compile itself) and should not be used as a
23+ * general escape hatch for cycles.
2324 */
2425export function detectAndReportWorkspaceCycles (
2526 rushConfiguration : RushConfiguration ,
@@ -36,10 +37,9 @@ export function detectAndReportWorkspaceCycles(
3637 `To fix this, refactor the code to eliminate the cycle. For example, extract the shared ` +
3738 `code into a new package that both projects can depend on, or move code from one project ` +
3839 `to another so the dependency only goes in one direction.\n\n` +
39- `If the cycle truly cannot be broken by refactoring, you can use the ` +
40- `"decoupledLocalDependencies" field in ${ RushConstants . rushJsonFilename } as a last resort. ` +
41- `This causes Rush to treat that dependency as an external package rather than a local ` +
42- `workspace package, at the cost of losing workspace linking for that edge.`
40+ `NOTE: The "decoupledLocalDependencies" setting in ${ RushConstants . rushJsonFilename } is ` +
41+ `intended only for the bootstrapping problem (for example, the version of a compiler used ` +
42+ `to compile itself). It is not a general solution for cyclic dependencies.`
4343 )
4444 ) ;
4545 throw new AlreadyReportedError ( ) ;
0 commit comments