CFML: `createObject("component", "dotted.path")` creates no `instantiates` edge and gives no type to the chained receiver
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #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
- 平均マージ
- 7時間 49分
- マージ済み PR(30日)
- 629
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
colbymchenry/codegraph のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
colbymchenry/codegraph#1900 · コメント 2 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
colbymchenry/codegraph#1700 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
colbymchenry/codegraph#1535 · コメント 2 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
colbymchenry/codegraph#1403 ·
メンテナーはふだん 1 日以内に返信
-
agent-target
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
colbymchenry/codegraph#649 · コメント 5 件 · リアクション 50 件 ·
メンテナーはふだん 1 日以内に返信
colbymchenry/codegraph の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
Lakr233/vphone-cli#743 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
libsdl-org/SDL#16584 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
FriendsofECCE/ECCE#519 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
containers/crun#2415 ·
メンテナーはふだん 1 日以内に返信