自动清理无效代码
- Meta’s Systematic Code and Asset Removal Framework (SCARF) has a subsystem for identifying and removing dead code.
- Meta的系统化代码和资产删除框架(SCARF)具有识别和删除死代码的子系统。
- SCARF combines static and dynamic analysis of programs to detect dead code from both a business and programming language perspective.
- SCARF结合程序的静态和动态分析,从业务和编程语言的角度检测死代码。
- SCARF automatically creates change requests that delete the dead code identified from the program analysis, minimizing developer costs.
- SCARF自动创建更改请求,从程序分析中删除已识别的死代码,从而最小化开发人员成本。
In our last blog post on automatic product deprecation, we talked about the complexities of product deprecations, and a solution Meta has built called the Systematic Code and Asset Removal Framework (SCARF). As an example, we looked at Moments, the photo sharing app Meta launched in 2015 and eventually shut down in 2019, and how SCARF can help with the deprecation process through its workflow management capabilities. We discussed how SCARF saves engineering time by identifying the correct order of tasks for cleaning up a product and how it can be blocked from automating the cleanup when there are intersystem dependencies. This naturally leads to the question: How do we automatically unblock SCARF when there is code that references an asset?
在我们上一篇关于自动产品淘汰的博客文章中,我们谈到了产品淘汰的复杂性,以及 Meta 构建的名为 Systematic Code and Asset Removal Framework(SCARF)的解决方案。例如,我们看了看 Meta 在 2015 年推出并最终关闭的照片分享应用 Moments,以及 SCARF 如何通过其工作流管理功能帮助淘汰过程。我们讨论了 SCARF 如何通过识别清理产品的正确任务顺序来节省工程时间,以及当存在系统间依赖关系时,如何阻止其自动清理。这自然引出了一个问题:当存在引用资产的代码时,我们如何自动解除 SCARF 的阻塞呢?
Dead code removal in SCARF
SCARF 中的死代码删除
SCARF contains a subsystem that automatically identifies dead code through a combination of static, runtime, and application analysis. It leverages this analysis to submit change requests to remove this code from our systems. This automated dead code removal improves the quality of our systems and also unblocks unused data removal in SCARF when the dead code includes references to data assets that prevent automated data cleanup.
SCARF包含一个子系统,通过静态、运行时和应用程序分析的组合自动识别死...