Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

CFML: `createObject("component", "dotted.path")` creates no `instantiates` edge and gives no type to the chained receiver

クローズ
#2,652 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 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 instantiates edge to contens/core/queue/batchcontext.cfc
  • init in unresolved_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 instantiates edge, resolved with the same dotted-path rules as extends
  • 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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

colbymchenry/codegraph のほかの issue

colbymchenry/codegraph の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。