Commit ccafc60
authored
fix(native): align edge builder kind filters with JS parity (#541)
* fix(native): align edge builder kind filters with JS parity
The Rust edge builder only matched `kind == "class"` when looking up
source nodes and targets for extends/implements edges. This caused all
`impl Trait for Struct` relationships (and any non-class hierarchy) to
be silently dropped — producing 0 implements edges for Rust sources
while WASM correctly found 9.
Align the three kind filter sets with the JS-side constants:
- Source: class, struct, record, enum (was: class only)
- Extends targets: class, struct, trait, record (was: class only)
- Implements targets: interface, class, trait (was: interface, class)
Fixes #530 (partial — implements parity gap)
Impact: 1 functions changed, 0 affected
* refactor: extract kind-filter constants for readability (#541)
Extract inline kind-filter closures into named constants
(HIERARCHY_SOURCE_KINDS, EXTENDS_TARGET_KINDS, IMPLEMENTS_TARGET_KINDS)
at module level, mirroring the JS-side convention in build-edges.js.
This prevents future native/WASM drift by giving each set a single
source of truth.1 parent c433e6e commit ccafc60
1 file changed
Lines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
7 | 15 | | |
8 | 16 | | |
9 | 17 | | |
| |||
339 | 347 | | |
340 | 348 | | |
341 | 349 | | |
342 | | - | |
343 | | - | |
344 | | - | |
| 350 | + | |
345 | 351 | | |
346 | 352 | | |
347 | 353 | | |
348 | 354 | | |
349 | 355 | | |
350 | 356 | | |
351 | | - | |
| 357 | + | |
352 | 358 | | |
353 | 359 | | |
354 | 360 | | |
| |||
366 | 372 | | |
367 | 373 | | |
368 | 374 | | |
369 | | - | |
| 375 | + | |
370 | 376 | | |
371 | 377 | | |
372 | 378 | | |
| |||
0 commit comments