feat: resolve transitive imports and detect dependency cycles#18
Open
om-deshmukh-dev wants to merge 3 commits into
Open
feat: resolve transitive imports and detect dependency cycles#18om-deshmukh-dev wants to merge 3 commits into
om-deshmukh-dev wants to merge 3 commits into
Conversation
- Remove debug fetch() telemetry from importExtractor - Remove dist/ from .gitignore and add prepare script - Update resolveTransitiveEdges to track and emit full dependency paths (transitive: A → B → C) instead of just "(transitive)" - Fix reporter to render individual parser diagnostics in human output instead of just category counts - Add transitive-violation-repo and cycle-repo fixtures with snapshots - Add tests for transitive violation detection and cycle termination
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
Implements recursive transitive dependency resolution via BFS, violations are now detected even when the forbidden import happens indirectly through an intermediate layer
Transitive violations report the full dependency path so the output explains why the violation exists
Adds cycle detection using DFS with three-color marking; cycles are surfaced as
CIRCULAR_DEPENDENCYparser diagnostics and don't block analysisimportExtractor.tsdist/from.gitignoreand adds apreparescript sonpm installauto-rebuilds itTest plan
npm testpassestransitive-violation-repofixture confirms transitive violation is detected with full path in both human and JSON outputcycle-repofixture confirms cycle detection terminates cleanly with deterministic output across multiple runs