main does not build: utils/convert imports utils/sync after it moved to internal/sync

Abierto Apto para principiantes
#2,670 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
92/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
go
Área
build-system

Línea de trabajo

Abre utils/convert/stat.go y compara su importación de sync con el paquete trasladado a internal/sync. El issue dice que GetByteSlice y PutByteSlice están disponibles allí con los mismos nombres, así que la ruta de importación es el punto de partida. Ejecuta go build ./utils/convert y go test ./utils/merkletrie/...; se habrá terminado cuando ambos comandos pasen.

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

Descripción

What breaks

main does not build for any package that reaches utils/convert:

$ go build ./utils/convert
utils/convert/stat.go:6:2: no required module provides package github.com/go-git/go-git/v6/utils/sync
	to add it: go get github.com/go-git/go-git/v6/utils/sync

utils/sync was moved to internal/sync in 0efe1fbc (2026-11-19, "utils: sync, Move to internal/sync"). utils/convert/stat.go then imported the old path in 2db5ca13 (2026-11-26, "utils: convert, Read content in chunks for text statistics"). Both are ancestors of 430ab14f.

Reproduction

git clone https://github.com/go-git/go-git && cd go-git
git checkout 430ab14f
go build ./utils/convert

Fails with the message above on a clean checkout of main (reproduced here on 430ab14f, macOS, go1.27.4). go build ./... stops in the same place.

Knock-on effect

utils/merkletrie/filesystem imports utils/convert, so it fails at setup too, and go test ./utils/merkletrie/... cannot run either:

# github.com/go-git/go-git/v6/utils/merkletrie/filesystem
utils/convert/stat.go:6:2: no required module provides package github.com/go-git/go-git/v6/utils/sync
FAIL	github.com/go-git/go-git/v6/utils/merkletrie/filesystem [setup failed]

The current main CI run reflects this: test (master, ubuntu-latest), test (stable, ubuntu-latest), test (stable, windows-latest) and test (stable, macos-latest) are all failing on 430ab14f.

Fix

Point the import at internal/sync. The two identifiers it uses, sync.GetByteSlice() and sync.PutByteSlice() (utils/convert/stat.go:41-42), exist in internal/sync/bytes.go under the same names, so the import line is the only change needed. I have not included a patch here because I have an unrelated PR open against this repository and did not want to add a second one on the same day; happy to send it if nobody has picked this up.

Lenguaje dominante
Go
Estrellas
7.9k
Forks
1.1k
Merge medio
4 d 19 h
PR fusionados (30 d)
34

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 go-git/go-git

Todos los issues de go-git/go-git

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.