bug: Support non-string (bool/int) attribute values in Tango

Aperta
#318 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go

Direzione di ricerca

Start by examining mapper/mapper.go lines 69-77 to see the current string-only filter. Review proto/tango.proto to understand the Metadata structure and plan the additive changes. Then, look at core/itg/graph/graph.go for interning logic and internal/targetdiff/compare.go line 142 for attribute comparison. A good first step is to run existing tests to ensure they pass before modifying the type handling.

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

Descrizione

enhancement

Problem

Tango only propagates string-valued Bazel attributes. mapper/mapper.go:69-77 filters ingestion to Attribute_STRING only — bool/int/other types are dropped before reaching the graph, and the proto (proto/tango.proto) has no field to carry them anyway.

Effect: internal/targetdiff/compare.go:142 can't see non-string attribute changes, so a target whose only real change is e.g. a boolean flip still gets flagged as changed (via hash) but is misclassified as INDIRECT instead of DIRECT.

Proposed Solution

  • Add typed value mapping(s) to Metadata in proto/tango.proto (additive, backward compatible).
  • Remove the STRING-only filter in mapper/mapper.go; route by attr.GetType().
  • Update interning in core/itg/graph/graph.go to handle typed values, not just GetStringValue().
  • Extend attributesChanged in internal/targetdiff/compare.go to compare typed values.
Lingua principale
Go
Stelle
23
Fork
11
Merge medio
1g 10h
PR unite (30g)
18

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 uber/tango

Tutte le issue di uber/tango

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.