Repository navigation
Conversation
…Data#2061) Overloads that share a base QN (Java/C#/C++/Kotlin/Swift/Scala/ObjC) merge into one graph node today, and that node collects the CALLS of every overload. The agreed cure is one signature-qualified callable identity for all overloading languages: callable_qn := base_qn [<tparams>] (params) [cvref] This change lands the plumbing with every language still at CBM_CALLABLE_ID_NONE, so the graph is byte-identical; each language is switched on later in its own change (with its index-format bump). - internal/cbm/callable_sig.{c,h}: the per-language mode side table (NONE|TYPED|LABELED_TYPED|LABELED|ARITY; kept out of CBMLangSpec like cbm_string_dispatch_suffixes, since ~160 positional rows would otherwise all need the member under -Wmissing-field-initializers), the shared builder cbm_callable_sig[_mode] for the def and the call-scope QN, and the inverse cbm_qn_callable_base_len[_named]. Suffix contract: no '.', '::' or '->'; whitespace-normalized; comments/annotations/attributes dropped; qualified types keep their last segment; '->' spelled '=>'; variadic '[]' (Java) / '~'; C++ top-level cv dropped, arrays decay, cvref kept; <= 200 bytes, longer ones keep whole leading entries and end in '#<fnv1a64 of the full suffix>)'. The builder is iterative (cursor walk, bounded declarator loop) and self-checks against the inverse. - The inverse is anchored to the node's bare name wherever the name is known: real QNs already end in ')' without being callables (a Java field whose name is its declarator `X = f()`, make `$(VAR)` targets), and only the anchor makes the inverse exact on them. - Leaf splitters strip a suffix first (no-op today): registry by-name key (indexed by the bare name for a suffixed callable), cbm_lsp_bare_segment, cbm_pipeline_qn_class_method_tail, pxc_last_component, pxc_qn_leaf, go_index_visit_node, collect_prod_defs, sg_qn_prefix_len. - New unused fields: CBMDefinition.qn_sig_off, CBMResolvedCall.callee_sig (relocated by result compaction), CBMRegisteredFunc.sig, CBMLSPDef.sig. The lsp_surface codec is unchanged (no format bump in this change). - get_code_snippet and trace_path gain base-QN tiers (cbm_store_find_nodes_by_qn_base) that find nothing until suffixes exist. - store: cbm_store_find_nodes_by_qn_suffix built its LIKE pattern in a 512-byte buffer (a long suffix was truncated into a pattern that matched nothing) and did not escape '_'/'%' (`my_func` also matched `myXfunc`). The pattern is now heap-built, escaped, and matched with ESCAPE '\'. Proof: full sorted node+edge+lsp_surface dumps are byte-identical before and after on 7 corpora (this repo, elasticsearch libs, Exposed, dotnet System.Linq, System.Collections, coreclr/gc, a C corpus). Refs DeusData#2061 Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Enable typed, labeled Swift callable identities on the shared DeusData#2061 plumbing. Resolve calls by compatible labels, defaulted parameters, and trailing closures; retain all compatible overload edges with candidate counts. Cover registry, pipeline, and signature behavior. Refs DeusData#2061 Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Force the parallel call pass on a Swift fixture and assert both label-compatible type overloads retain CALLS edges with the ambiguity count. Refs DeusData#2061 Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
A Swift call that shares its bare name with project symbols but matches none of their overloads was handled differently by the two resolvers: the parallel path cleared the bare-name match and fell through as unresolved (keeping each resolver's empty-resolution service fallbacks), while the sequential path dropped the call outright. Skip the bare-name registry bind on the sequential path too — it would bind a wrong overload — and continue as unresolved, so count < 0 behaves exactly like any other unresolved call on each resolver. Pipeline regressions pin the global-fetch fallback (DeusData#856) on both paths: the incompatible local overload gets no wrong CALLS edge, and the URL call keeps its HTTP_CALLS edge. The route-registration fallback differs between the paths on main (sequential additionally requires a '/'-leading first argument); that pre-existing divergence is out of scope here. Refs DeusData#2061 Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
|
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. |
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
3441da4 to
5538355
Compare
Signed-off-by: DavidHLP <lysf15520112973@163.com>
|
Thank you for the detailed status update and for clearly distinguishing the actual PR head from unpublished work and unverified results. The changed-file scope includes callable identity, resolution and persisted metadata, so we need more time for a complete review together with the parent change. This remains queued for deeper review; this comment is not an approval or a request for another routine rebase. The queue is full, and we appreciate your patience and the care taken to document the remaining work. |
Swift-scope checkpoint for DeusData#2061: capture bounded trailing-closure labels, match Swift overload candidates conservatively, and cover extraction, registry, compact/spill, serial, parallel, and incremental behavior. Validation: ASan passed on the combined WIP source only; this A-only checkpoint has not been independently verified. GCC TSan, smoke, and memory gates remain failed/open. This commit is a scope checkpoint, not acceptance. Signed-off-by: David HLP <lysf15520112973@163.com>
Signed-off-by: David HLP <lysf15520112973@163.com>
Signed-off-by: David HLP <lysf15520112973@163.com>
Signed-off-by: David HLP <lysf15520112973@163.com>
Signed-off-by: David HLP <lysf15520112973@163.com>
Signed-off-by: David HLP <lysf15520112973@163.com>
Signed-off-by: David HLP <lysf15520112973@163.com>
4dbfd27 to
eea3143
Compare
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
|
I've finished the Swift fixes on top of #2342. The current head is The two remaining collisions now have separate identities: The main thing I'd like feedback on is the identity spelling: qualified types use On remote-dev, 909 focused tests and 328 pipeline TSan tests passed, along with the separate graph and MCP checks, production build and CI lint. There are still two ObjectScript UBSan reports, so the focused run isn't sanitizer-clean. The full C run stops at the Scoop metadata precheck, full clang-tidy still reports errors, and the native CLI crashes at startup with the same stack seen in the earlier main comparison. Current macOS, Windows and Ubuntu CLI checks haven't been run. Test commands and full logs are available here. I removed the duplicate progress comments; their original text is archived. This is ready for review, with the remaining checks and approval still pending. |
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
1a94454 to
caa4d0c
Compare
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
…eat/issue-2061-swift-identity
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Signed-off-by: DavidHLP <lysf15520112973@163.com>
Preserve Swift identity and upstream image migration coverage. Advance the combined index format to 6 so pre-merge format-5 indexes also rebuild invented image hosts. Refs DeusData#2061. Signed-off-by: DavidHLP <lysf15520112973@163.com>
Summary
Refs #2061. Builds on merged #2342 and enables signature-qualified callable identities for Swift only. Bare node names are preserved.
This remains a large change (26 files, +2969/-77 against the current base), above CONTRIBUTING.md's recommended PR size. The remaining changes implement and test this single Swift identity boundary, its call resolution, and persisted migration.
AI assistance: This update was prepared with an AI agent acting on behalf of DavidHLP.
Validation
Current source head:
4ab447f8dcc75059e562c7d9afdc603d054eae33, including upstream maina7158ac2f48ca646b4527341b76f930f2aeff87e.Latest main integration validation in Linux x86_64 Docker:
UBSAN_OPTIONS=halt_on_error=1 scripts/test.sh --suites index_format: all 6 tests passed with ASan/UBSan, including the retained Swift migration cases and image migration from formats 2 and 5.scripts/lint.sh --ci CLANG_FORMAT=clang-format-20 "CPPCHECK=cppcheck -j4": passed.git diff --check: passed.The implementation validation below was performed before this latest merge, at source head
a9e56d92fd36190598cffbbddf1e6ef47cb98fac(Docker product-code snapshot5142a753433e89edcfbffbcd7a4c6169b6f64c68). It is not a fresh full test run of the current head.Independent Linux x86_64 Docker checks use the repository's canonical build/test/lint scripts. Official Swift 6.0.3 typechecks all four independent input groups. The original main, previous PR head, and revised implementation are compared for the reported fake caller, static/instance identity, constrained extensions, capped signatures, and a large same-name bucket. The new regression cases were observed failing before the correction.
Before the latest main integration:
scripts/test.sh --suites callable_sig,registry,index_format,extraction: 577 tests passed.UBSAN_OPTIONS=halt_on_error=1. These overlap the suite run and are not 44 additional distinct tests.scripts/test.sh --contracts-only: all contracts passed in a Docker container with--init.scripts/lint.sh --ci CLANG_FORMAT=clang-format-20 "CPPCHECK=cppcheck -j4": passed, including no-skips, formatting, cppcheck, NOLINT, and memory-core checks.The broader extraction run emits ObjectScript/Perl UBSan diagnostics and is not sanitizer-clean. Those paths are outside this change. Full local cross-platform tests and TSan were not rerun.
GitHub checks for the current source head have not completed; no completed current-head matrix is claimed.
Maintainer review is pending. Passing checks are not maintainer approval.
Review focus
Checklist