Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Dependency analysis

未关闭
#8,499 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rescript-lang/rescript 的其他 Issue

查看 rescript-lang/rescript 的全部 Issue

相似的 Issue

更多 Build System Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。