fix: 增强循环依赖检测和诊断功能#36
Merged
Merged
Conversation
修复了用户报告的循环依赖误报问题: 1. 增强循环依赖检测的诊断信息 - 使用 Tarjan 算法准确找出强连通分量(真正的循环) - 提供详细的依赖关系信息帮助调试 - 显示每个符号的所有依赖、循环内依赖和已处理依赖 2. 修复自引用导致的假循环依赖 - 在构建依赖图时忽略符号对自身的依赖 - 避免类引用自己导致的误报 3. 修复类方法处理逻辑 - 类的方法不再作为独立符号输出 - 避免方法依赖其父类产生的假循环依赖 - 类方法会随类定义一起输出 测试用例:添加了专门的循环依赖检测测试 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
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
主要修改
1. 增强循环依赖检测算法
2. 修复自引用问题
dep \!= symbol)3. 修复类方法处理逻辑
测试验证
用户报告的错误:
修复后成功合并:
Test plan
🤖 Generated with Claude Code