Repository navigation
ci: release-please no longer reads a package's own dev-dependency as … - #127
Merged
Merged
Conversation
…a cycle win-durable-ioring lists itself as a dev-dependency to switch on its own fault-injection feature for tests and doctests, which Cargo accepts and which depends on nothing else. The cargo-workspace plugin's graph counts it as an edge, so every release run failed with "found cycle in dependency graph". CalendarWorkspace now drops a package's edge to itself when it builds the graph; a real cycle between two packages is still refused. Tested both ways, and the test fails on the old plugin. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The narrow filter preserves inter-package edges, and regression assertions cover both intended behaviors.
0 open findings
What changed in this PR
Fixes release planning for Cargo packages that list themselves as dev-dependencies.
Changes:
- Removes self-dependency edges while preserving inter-package dependencies.
- Adds regression coverage for accepted self-dependencies and rejected genuine cycles.
| File | Description |
|---|---|
.github/release/release.test.cjs |
Tests self-dependency handling and genuine cycle detection. |
.github/release/release.cjs |
Filters self-edges from the workspace dependency graph. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request addresses an issue with the dependency graph logic in the release tooling for Cargo workspaces, specifically handling cases where a package lists itself as a dev-dependency. The main improvement is that self-referential dev-dependencies are no longer treated as dependency cycles, which previously blocked release planning. Additionally, a new test has been added to verify this behavior and ensure that real dependency cycles are still detected.
Dependency graph improvements:
buildGraphmethod inCalendarWorkspaceto filter out self-dependencies from the dependency graph, preventing false-positive cycle detection when a package lists itself as a dev-dependency.Testing:
win-durable-ioring lists itself as a dev-dependency to switch on its own fault-injection feature for tests and doctests, which Cargo accepts and which depends on nothing else. The cargo-workspace plugin's graph counts it as an edge, so every release run failed with "found cycle in dependency graph". CalendarWorkspace now drops a package's edge to itself when it builds the graph; a real cycle between two packages is still refused. Tested both ways, and the test fails on the old plugin.