Skip to content

Commit

Permalink
fix(crates): Skip path-only dev-dependencies in dep cycle checking (#341
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Swatinem authored Jan 14, 2022
1 parent 03fda08 commit 2ff325e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/targets/crates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2ff325e

Please sign in to comment.