Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đã đóng
#2,652 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Một pull request liên quan đã được merge.

  • #2841 của @colbymchenry — đã merge

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Lĩnh vực
devtools

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C
Star
73.2k
Fork
4.7k
Merge trung bình
7 giờ 49 phút
Pull request đã merge (30 ngày)
629

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của colbymchenry/codegraph

Tất cả issue của colbymchenry/codegraph

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.