Dependency analysis
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 冷清
- 技术栈
- javascript
调研方向
从链接的 res-dep-issue 示例开始,对比其 main 和 rescript-11-cjs 分支,并复现 pnpm 风格的链接失败。然后阅读编译器的依赖分析入口点,确定应如何检查 package.json 中的依赖项。当所提议的分析能够可靠地识别错误依赖,并且有清晰的 Knip 集成路径时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Currently it is very hard to analyze where a dependency will be imported, for example:
type t
@module("dep") external make: unit => t = "make"
let timeMake = () => {
Js.Console.timeStart("make")
let t = make()
Js.Console.timeEnd("make")
t
}
A consuming module may import dep directly, or it may not depending on which function is used and if there is an interface file.
If dependencies, devDependencies, and peerDependencies are not properly set this may become a problem for certain package manager setups. A small change could end up causing a runtime error. It could be particularly insidious if it is a rarely used or lazy loaded binding.
Due to the different dependency types often being misunderstood and the complexity of analysis, I believe ReScript should have the ability to check package.json dependencies for correctness.
I've had Claude create an example project here that failures when using pnpm style linking. The main branch uses ReScript 12 and ESM, but there is also a rescript-11-cjs branch for reference.
BTW it could be helpful if this feature was implemented in a way that we could integrate with Knip as a plugin
- 主要语言
- OCaml
- 星标
- 7.5k
- 派生
- 485
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 55
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rescript-lang/rescript 的其他 Issue
-
难度 5/5 一周以上 新手友好度 35/100
rescript-lang/rescript#8659 · 2 条评论 · 2 个 reaction ·
-
难度 5/5 一周以上 新手友好度 35/100
rescript-lang/rescript#8647 ·
-
rescript-lang/rescript#8632 · 已指派 1 人 ·
-
难度 5/5 一周以上 新手友好度 28/100
rescript-lang/rescript#8624 ·
-
难度 5/5 一周以上 新手友好度 30/100
rescript-lang/rescript#8596 · 2 条评论 ·
查看 rescript-lang/rescript 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
bazel-contrib/rules_go#4726 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 85/100
HL7/fhir-ig-publisher#1375 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
-
area/install-update comp/cli comp/desktop P3 sweeper:risk-compatibility type/bug
难度 2/5 1-3 小时 新手友好度 86/100
NousResearch/hermes-agent#122386 · 1 条评论 ·