Repository navigation
Conversation
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
f88aaeb to
33a9bbe
Compare
907a434 to
4e550e8
Compare
|
Thank you so much, @antespi, for this PR, the clear root-cause write-up and the end-to-end NestJS repro. It is a really useful piece of work. One thing changed underneath it, and we are sorry for the overlap. Another fix for #514, #2523, landed on main today (merge 369cf76). It registers TypeScript constructor parameter properties as class fields and also resolves fields initialized with Your five later commits add things main still does not have:
Would you be up for rebasing #2402 onto current main without the first commit? Your three Two small things for the rebase:
Thanks again for pushing NestJS support forward! |
e9c93db to
8fed357
Compare
Signed-off-by: Antonio Espinosa <antespi@gmail.com>
Signed-off-by: Antonio Espinosa <antespi@gmail.com>
Signed-off-by: Antonio Espinosa <antespi@gmail.com>
Signed-off-by: Antonio Espinosa <antespi@gmail.com>
Signed-off-by: Antonio Espinosa <antespi@gmail.com>
What does this PR do?
TypeScript constructor parameter properties were never registered as class fields, so calls through NestJS-style injected services did not resolve and
trace_pathreported zerocallers.
This is the minimal repro from the #514 thread; the maintainer comment there identified the cause.
Root cause
ast_sweep_shapes() in internal/cbm/lsp/ts_lsp.c collected class fields only from public_field_definition members. Parameters declared in the constructor with an accessibility,
readonly or override modifier are fields in TypeScript, but were skipped, so this.catService had no type and the member call could not be resolved.
Fix
In the class-body sweep, a constructor method_definition now has its required_parameter / optional_parameter children inspected. A parameter carrying accessibility_modifier,
readonly or override_modifier is registered as a field with its annotated type. Plain parameters without a modifier are not fields and stay excluded.
ast_sweep_shapes() runs in the per-file pass and in both cross-file passes (cbm_run_ts_lsp_cross, cbm_run_ts_lsp_cross_with_registry), so this one change covers same-file and
cross-file injection.
Tests
the fix: callers_total: 1 (CatController.list).
Results (Linux x86_64, ASan + UBSan test build):
(install_dir_group_or_world_writable (mode 0775)); the suites touched by this PR are unaffected.
Scope
This covers constructor parameter properties only. The other patterns described in #514 are not addressed:
Refs #514
Written with Claude Code (AI-assisted). I reviewed the change and certify it via the DCO sign-off.
🤖 Generated with Claude Code
Checklist
git commit -s) — required, CI rejectsunsigned commits (DCO, see CONTRIBUTING.md)
make -f Makefile.cbm test)make -f Makefile.cbm lint-ci)