From 2ff325e4d0ac9d4a8410b8107cede9144c2b91b6 Mon Sep 17 00:00:00 2001 From: Arpad Borsos Date: Fri, 14 Jan 2022 17:23:02 +0100 Subject: [PATCH] fix(crates): Skip path-only dev-dependencies in dep cycle checking (#341) --- src/targets/crates.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/targets/crates.ts b/src/targets/crates.ts index e6cf6c93..a28fe152 100644 --- a/src/targets/crates.ts +++ b/src/targets/crates.ts @@ -185,7 +185,12 @@ export class CratesTarget extends BaseTarget { const isWorkspaceDependency = (dep: CrateDependency) => { // Optionally exclude dev dependencies from dependency resolution. When // this flag is provided, these usually lead to circular dependencies. - if (this.cratesConfig.noDevDeps && dep.kind === 'dev') { + // Path-only dependencies are designated by `req = *`, and are not being + // validated by cargo on publish. + if ( + dep.kind === 'dev' && + (dep.req === '*' || this.cratesConfig.noDevDeps) + ) { return false; }