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

Abierto
#318 0 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
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
65/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
go

Línea de trabajo

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.

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

Descripción

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.
Lenguaje dominante
Go
Estrellas
23
Forks
11
Merge medio
1 d 10 h
PR fusionados (30 d)
18

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

Todos los issues de uber/tango

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.