CFML: `createObject("component", "dotted.path")` creates no `instantiates` edge and gives no type to the chained receiver
维护者通常 1 天内回复
已经有一个关联 PR 被合并了。
- #2841 来自 @colbymchenry —— 已合并
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 领域
- devtools
调研方向
Start by locating how new a.b.C() creates instantiation edges and how extends resolves dotted paths; the issue does not name those files or tests. Then trace how chained .init(...) receivers are typed, including the behavior referenced in #1155. Done means a string-literal createObject("component", "a.b.c") creates a resolved instantiation edge and types the chained receiver and assigned variable.
由索引模型根据 Issue 内容生成。
描述
Summary
new foo.bar.Baz() produces an instantiates edge. The equally common createObject form does not, and older code uses it more often than new.
<cfset var oContext = createObject("component", "contenscms.core.queue.batchcontext").init()>
For this line (contens/api/v2/contens/batch/collection.cfc:33) the index has:
- no
instantiatesedge tocontens/core/queue/batchcontext.cfc initinunresolved_refs
Numbers from our project
| Pattern | Occurrences | instantiates edges |
|---|---|---|
new a.b.C(...) |
158 | 160 (all instantiates edges under contens/) |
createObject("component", "<literal>") |
417 | 0 |
No instantiates edge in the index has a dotted ref name.
Expected
When the second argument is a string literal, treat createObject("component", "a.b.c") like new a.b.c():
- create an
instantiatesedge, resolved with the same dotted-path rules asextends - type the receiver of a chained
.init(...)and the assigned variable as that component, so the receiver inference from #1155 can use it
The one-argument form createObject("a.b.c") (supported by Lucee and ACF) could be handled the same way.
- 主要语言
- C
- 星标
- 73.2k
- 派生
- 4.7k
- 平均合并
- 3 小时 39 分钟
- 30 天内合并 PR
- 528
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
colbymchenry/codegraph 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
colbymchenry/codegraph#3223 ·
维护者通常 1 天内回复
-
A `../` entry in package.json `workspaces` makes a folder outside the project count as a workspace package, and a call gets linked to the wrong function可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
colbymchenry/codegraph#3093 ·
维护者通常 1 天内回复
-
Windows: npm-shim spawnSync missing windowsHide flashes a console window on every MCP server launch未关闭
难度 2/5 1-3 小时 新手友好度 86/100
colbymchenry/codegraph#3054 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
colbymchenry/codegraph#2974 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
colbymchenry/codegraph#2959 · 3 条评论 ·
维护者通常 1 天内回复
查看 colbymchenry/codegraph 的全部 Issue
相似的 Issue
-
ai-driven-fuzzing bug claude Minor
难度 2/5 1-3 小时 新手友好度 78/100
linagora/open-bastion#425 ·
维护者通常 1 天内回复
-
question
难度 1/5 1 小时以内 新手友好度 68/100
-
examples/dnsdoctor: cleanup.sh stops at the first missing piece of a setup.sh that did not finish未关闭severity: low
难度 2/5 1-3 小时 新手友好度 70/100
luainkernel/lunatik#2263 ·
维护者通常 1 天内回复
-
难度 2/5 半天 新手友好度 72/100
vercel-labs/scriptc#2910 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
darktable-org/darktable#22939 ·
维护者通常 1 天内回复