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

Aperta
#4,991 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Ambito
tooling

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
Python
Stelle
57
Fork
11
Merge medio
1h 35m
PR unite (30g)
975

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di squid-protocol/gitgalaxy

Tutte le issue di squid-protocol/gitgalaxy

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.