Skip to content

TSExternalSymbol has multiple versions #231

Description

@georgesafta

Describe the bug
TSExternalSymbol model out of sync

It's defined as:

class TSExternalSymbol(_Base):
    """A WALA-style phantom node: a synthetic stub for a call target OUTSIDE the project (an
    imported/required library member). An edge's ``target`` byte-matches either a real
    ``TSCallable.signature`` or a ``TSExternalSymbol.signature``, so the call graph stays
    dangling-free while still recording external (e.g. sink) calls.

    Slim: the map key in ``TSApplication.external_symbols`` IS the signature (e.g.
    ``commander.parse``), and membership already means external — so neither is repeated here."""

    name: str
    module: str

while from Neo4J it is constructed as:

def external(props: Props) -> TSExternalSymbol:
    return TSExternalSymbol(
        signature=props.get("signature", ""),
        name=props.get("name", ""),
        module=props.get("module", ""),
        kind=props.get("kind", "unknown"),
    )

A similar behavior is present in the codeanalyzer:

To Reproduce
Load TS model from an application with external symbols.

Expected behavior
Single model

Logs
No

Additional context
No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions