[Grove] Fix peer cyclic module dependency detection - #76
Open
MonzerMansour wants to merge 1 commit into
Open
Conversation
Required mutual @dependency between modules both listed in Configuration skipped search-stack cycle checks and infinite-recursed in type-order DFS. Record required edges during resolve, detect peer cycles before ordering, and add a DFS visited/in-progress safety net so optional peer cycles also fail with searchStackCycle instead of crashing. Cover peer, longer, optional, mixed, acyclic, and diamond cases in DependencyTests. Closes SchmiedmayerLab#18 Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Summary
buildTypeOrderDFS safety net so optional/mixed peer cycles error withsearchStackCycleinstead of infinite recursion.Motivation
Issue #18’s reproduction (ModuleA ↔ ModuleB both configured) crashed in recursive type-order DFS because
requireearly-returns for already-queued peers and never extends the search stack.Changes
DependencyManager.swiftModule-Dependency.mdDependencyTests.swiftTest plan
xcodebuild test -scheme Grove-Tests -testPlan Grove -destination 'platform=macOS'→ TEST SUCCEEDED (62 tests)peerModuleCycle,longerPeerModuleCycle, optional/mixed peer cycle tests greenmoduleCircle1+ acyclic/diamond cases greenOut of scope
Closes #18