Skip to content

ENH: Packages and their methods are not present as nodes #62

Closed as not planned

Description

@Shashankss1205

[2025-09-12 09:27:48] Resolved call: use_random @ /teamspace/studios/this_studio/demo/CodeGraphContext/tests/sample_project/advanced_imports.py calls randint @ /teamspace/studios/this_studio/demo/CodeGraphContext/tests/sample_project/advanced_imports.py

Still we dont have any connection between the 2 nodes, seemingly because the node is a function defined in a package, which isnt being added to the graph DB.

Activity

  1. DhineshPonnarasan commented on Feb 8, 2026

    @DhineshPonnarasan
    Contributor

    HI @Shashankss1205 , Bro shall I work on this

  2. Shashankss1205 commented on Aug 2, 2026

    @Shashankss1205
    CollaboratorAuthor

    Closing as a duplicate of #53.

    This issue reports the symptom — a call resolves (use_random → randint) but no edge appears, because the callee lives in a package that was never added to the graph. #53 requests the mechanism that fixes it: an index_dependencies flag on add_code_to_graph that indexes imported packages so those nodes exist to link to.

    Keeping #53 as canonical: it is older, has the actionable design, and carries the live thread with claimants.

    One distinction worth carrying over, since your example is stdlib (random) while #53 says "all the Python packages": package_resolver._is_stdlib_module currently exists to classify and exclude stdlib, so stdlib and third-party may need different handling. I've noted that on #53.

    Also relevant to whoever picks it up: #1528 — add_package_to_graph on a flat single-module package currently resolves to the entire site-packages directory, which would make naive dependency indexing catastrophic. That should be fixed first.

  3. moved this from Backlog tasks to Done in CGC Progress Boardon Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions