-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix/export star in dependence loop #1277
Conversation
Walkthrough整体变更包括增加了对Farm Tree Shake插件的功能改进,包括导出处理和优化逻辑的调整,以及针对不同模块的功能性新增和修改。 Changes
Poem
Note Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://coderabbit.ai TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
close #1272
所以不再计算所有模块的导出符号,仅从 export * 语句出发,递归的计算这条语句的导出符号即可。
另外因为存在 export * 成环,那么一个符号可能来自两条语句,所以匹配到所有的导出后对这些语句都做 used 处理。
见新增用例。
Summary by CodeRabbit
shake.rs
中添加了HashMap
和HashSet
的导入。fill_all_export_start_export_info
来修改函数optimize_farm
。AllExports
结构及相关导出处理功能。collect_all_exports_of
函数用于递归收集导出。