Skip to content

Fail CI when the library module graph gains a cycle - #405

Closed
ccombe wants to merge 1 commit into
jameskerr:mainfrom
ccombe:ci/madge-circular
Closed

ccombe wants to merge 1 commit into
jameskerr:mainfrom
ccombe:ci/madge-circular

Conversation

@ccombe

@ccombe ccombe commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The build workflow runs madge --circular on modules/react-arborist/dist/module/index.js after yarn build.
  • A new import cycle fails the pull request.

This is the follow-up to #400. main still has the data/create-root.js > interfaces/node-api.js cycle, so this check stays red until #400 merges. Rebase onto main after that and it should pass. No library source change, so no changeset.

Test plan

This branch already reports no cycles. Run madge after the build so a new one fails the pull request.

Co-authored-by: Cursor <cursoragent@cursor.com>
@netlify

netlify Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for react-arborist ready!

Name Link
🔨 Latest commit 34f09f9
🔍 Latest deploy log https://app.netlify.com/projects/react-arborist/deploys/6af158dc0e6683f68f847bd7
😎 Deploy Preview https://deploy-preview-405--react-arborist.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ccombe

ccombe commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Summary

  • The build workflow runs madge --circular on modules/react-arborist/dist/module/index.js after yarn build.
  • A new import cycle fails the pull request.

This is the follow-up to #400. main still has the data/create-root.js > interfaces/node-api.js cycle, so this check stays red until #400 merges. Rebase onto main after that and it should pass. No library source change, so no changeset.

Test plan

@ccombe

ccombe commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

The test job is red because main still has the cycle this check is there to catch: data/create-root.js > interfaces/node-api.js. That cycle is what #400 removes.

The same workflow is green on the cycle-fix branch: ccombe#3 (test passed).

This PR stays based on main, so it stays red until #400 merges. After that the step should pass, and fail again only if a new cycle shows up.

@ccombe

ccombe commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Build & Test failed because main still has the cycle #400 removes: data/create-root.js > interfaces/node-api.js. Merging this workflow change first would fail that job on every pull request.

The same madge --circular step is green on ccombe#3, which is based on the branch that already has no cycle. Reopen a main-based version of this after #400 lands.

@ccombe

ccombe commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Superseded: the one-line madge --circular CI step is now in #400 (5d6fc9d), so the guard lands together with the cycle fix instead of ahead of it. Leaving this PR closed.

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.

1 participant