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

Abierto
#4,991 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
38/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Área
tooling

Línea de trabajo

Start with _resolve_one and the _BUILTIN_INSTANCE_METHODS and _BUILTIN_NAMESPACES lists in gitgalaxy/core/call_resolver.py; compare how each language reaches the untyped receiver fallback. Check the TypeScript leftover in zod and use the language Level 2 checks in tests/tools/call_graph_resolution.py where available. Done means the affected built-in calls no longer link confidently to same-named repository methods, with each language's behavior measured or its fallback ruled out.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug Compiler call-graph comparison core-engine priority: medium scope:infra

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 #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. (#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.
Lenguaje dominante
Python
Estrellas
57
Forks
11
Merge medio
1 h 42 min
PR fusionados (30 d)
966

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de squid-protocol/gitgalaxy

Todos los issues de squid-protocol/gitgalaxy

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.