CFML: `createObject("component", "dotted.path")` creates no `instantiates` edge and gives no type to the chained receiver
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
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.
- 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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của colbymchenry/codegraph
-
codegraph ui - does not workĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
colbymchenry/codegraph#1900 · 2 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
colbymchenry/codegraph#1700 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
colbymchenry/codegraph#1535 · 2 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
colbymchenry/codegraph#1403 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-target
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
colbymchenry/codegraph#649 · 5 bình luận · 50 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của colbymchenry/codegraph
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
zephyrproject-rtos/zephyr#123423 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
dspromote: /etc/exports uses -alldirs on non-mount-point directories, so mountd exports nothingĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
nextbsd/nextbsd-userland#434 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[YSQL] Local-node initdb reads postgres.bki, but YB clusters bootstrap only from yb_postgres.bkiĐang mởarea/ysql kind/enhancement priority/low status/awaiting-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
yugabyte/yugabyte-db#35763 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[mimalloc] update to 3.6.0Đang mởcategory:port-update
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 2 ngày