Skip to content

Siblings of #3756: untyped-receiver built-in method calls in other languages #4991

Closed

Description

@squid-protocol

Siblings: #3756 (fixed for TS/JS in #4990)

Class: a call through an untyped, non-this receiver whose method name is a language built-in (s.trim(), m.get(), list.add()) links confidently (file/import) to a same-named repo method. #4990 fixed it in the resolver's untyped-receiver fallback (_resolve_one, gitgalaxy/core/call_resolver.py) with per-language lists _BUILTIN_INSTANCE_METHODS / _BUILTIN_NAMESPACES, filled only for TypeScript/JavaScript. The fallback itself is language-generic, so the other languages hit by it keep the bug until their lists exist and are measured.

Same mechanism for each box: add the language's built-in instance-method names (and global namespaces where relevant) and measure with that language's Level 2 check where one exists (tests/tools/call_graph_resolution.py). Before adding a list, check that the language really reaches this fallback with built-in names (duplicate search done per member: no open issue found).

  • TypeScript leftover: handleMapResult -> util.ts has@696 on zod@2bf7b0630d53, the last confident_external, reached by a step Call resolver: untyped receiver's JS/TS built-in method is ambiguous, not a confident link (#3756) #4990 does not cover. Diagnose it.
  • Python: check whether calls_out_qualifiers (d.get() on a dict) already covers the whole built-in class (str/list/dict/set methods); pyan Level 2 does not flag lib targets as external, so measure some other way.
  • Java: java.lang/java.util methods (list.add, map.get, s.equals, toString); scip-java Level 2 is the reference.
  • Kotlin: stdlib collection/String methods. (resolver: Kotlin stdlib built-ins on the untyped-receiver fallback (Part of #4991) #6466)
  • C#: BCL methods (List.Add, Dictionary.TryGetValue, string.Trim); no Level 2 reference yet.
  • Ruby: core methods (each, map, include?, []); no Level 2 reference yet.
  • PHP: method-only (built-ins are mostly free functions); confirm and close the box if nothing reaches the fallback.
  • Go: methods on stdlib types (strings.Builder.WriteString, bytes.Buffer); confirm whether untyped receivers reach the fallback.

Activity

  1. added
    bug
    on Oct 12, 2026
  2. added
    core-engine
    on Oct 12, 2026
  3. added
    scope:infra
    on Oct 16, 2026
  4. squid-protocol commented on Oct 25, 2026

    @squid-protocol
    OwnerAuthor

    #6667 merged: a partial slice of [c:7c32f4ca] "C#: BCL methods (List.Add, Dictionary.TryGetValue, string.Trim); no Level 2 reference yet."; left: list and unit tests done; no Level 2 reference for C# to measure against yet (promoter-bot)

  5. squid-protocol commented on Oct 25, 2026

    @squid-protocol
    OwnerAuthor

    #6667 merged: a partial slice of [c:baf75fe9] "Ruby: core methods (each, map, include?, []); no Level 2 reference yet."; left: list and unit tests done; no Level 2 reference for Ruby to measure against yet (promoter-bot)

  6. added a commit that references this issue on Nov 21, 2026
  7. squid-protocol commented on Nov 22, 2026

    @squid-protocol
    OwnerAuthor

    All sibling language built-in instance-method guards are implemented and verified in gitgalaxy/core/call_resolver.py (_BUILTIN_INSTANCE_METHODS):

    Closing as complete.

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

    Compiler call-graph comparisonbugcore-enginepriority: mediumscope:infra

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions