Skip to content

Julia WASM extractor has the same parameterized-type / qualified-def / qualified-selected-import bugs that #1098 fixed in native #1111

@carlos-alm

Description

@carlos-alm

Deferred from PR #1098 review.

PR #1098 fixed three P1 issues in the new native Julia extractor:

  1. Parameterized struct names silently dropped (struct Vec{T})
  2. Qualified function defs / short-form methods double-prefixed (Foo.bar inside module Outer becoming Outer.Foo.bar)
  3. selected_import with a qualified module producing wrong source (import LinearAlgebra.BLAS: gemm recording source="baz")

The WASM-side TS extractor at src/extractors/julia.ts has the same three bugs (verified by inspection during the merge resolution for #1098). They were not surfaced by the WASM tests because the existing fixtures only exercise the bare/unqualified shapes.

Per CLAUDE.md dual-engine policy ("Both engines must produce identical results — if they diverge, the less-accurate engine has a bug — fix it, don't document the gap"), these need to be ported to src/extractors/julia.ts so the two engines match.

Original reviewer comments (all P1, all addressed natively in #1098 commit 47b9c1f):

Context: #1098 ports the Julia extractor to native Rust and reaches feature parity with WASM. Fixing these in the native extractor first surfaces the WASM-side gap, which should be closed in a separate PR (one concern per PR — #1098 is the port, not a WASM cleanup).

Acceptance criteria

  • handleStructDef recurses through parameterized_identifier / parametrized_type_expression / type_parameter_list / type_argument_list wrappers (mirror the native find_base_name helper)
  • handleFunctionDef and handleAssignment guard the module-prefix step with !base.includes('.') to avoid double-prefixing
  • selected_import matches scoped_identifier alongside identifier and uses the trailing segment as the imported display name
  • Add WASM-side tests mirroring extracts_parameterized_struct_base_name, qualified_short_form_method_does_not_double_prefix, qualified_function_def_does_not_double_prefix, selected_import_handles_qualified_module from crates/codegraph-core/src/extractors/julia.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    follow-upDeferred work from PR reviews that needs tracking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions