Skip to content

ci: release-please no longer reads a package's own dev-dependency as … - #127

Merged
MikeGrier merged 2 commits into
mainfrom
mikegrier/public-epoch-ring
Oct 15, 2026
Merged

MikeGrier merged 2 commits into
mainfrom
mikegrier/public-epoch-ring

Conversation

@MikeGrier

Copy link
Copy Markdown
Owner

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:

  • Updated the buildGraph method in CalendarWorkspace to filter out self-dependencies from the dependency graph, preventing false-positive cycle detection when a package lists itself as a dev-dependency.

Testing:

  • Added a test to confirm that a package listing itself as a dev-dependency does not create a cycle, while genuine dependency cycles are still properly detected.…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.

…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>
Copilot AI balanced review requested due to automatic review settings October 15, 2026 00:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.

Copilot AI balanced review requested due to automatic review settings October 15, 2026 00:18
@MikeGrier
MikeGrier enabled auto-merge October 15, 2026 00:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The narrow filter preserves cross-package dependencies, and regression coverage checks both intended behaviors.

0 open findings

🧠 Review effort: Balanced

@MikeGrier
MikeGrier merged commit e4d58c7 into main Oct 15, 2026
40 checks passed
@MikeGrier
MikeGrier deleted the mikegrier/public-epoch-ring branch October 15, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants