github / github/codeql

Go autobuild tries to download module dependencies twice

Aperta
#11,991 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
question
Lingua principale
CodeQL
Stelle
10.1k
Fork
2.1k
Merge medio
2g 15h
PR unite (30g)
141

Descrizione

**Description of the issue**

I noticed [in my Go project](https://github.com/CrunchyData/postgres-operator/actions/runs/3999162447/jobs/6862717663) that autobuild successfully downloads Go modules then reports `Dependencies are still not resolving after the build`.

```

2023/01/24 18:14:22 Found go.mod, enabling go modules
go: downloading k8s.io/api v0.24.2
go: downloading k8s.io/apimachinery v0.24.2
go: downloading k8s.io/client-go v0.24.2

2023/01/24 18:14:32 Import path is 'github.com/CrunchyData/postgres-operator'
2023/01/24 18:14:32 Makefile found.
2023/01/24 18:14:32 Trying build command make []

2023/01/24 18:14:33 Dependencies are still not resolving after the build, continuing to install dependencies.
2023/01/24 18:14:33 Installing dependencies using `go get -v ./...`.
2023/01/24 18:14:35 Running extractor command…

```

🤔 `go mod tidy` downloads dependencies, so I don't expect `go get` needs to be called.

🤔 Is the following code correct? It seems to print `error` exactly when `.DepsErrors` is empty.
https://github.com/github/codeql/blob/07a7a213b3bf02a3408683c18d63b8be0f0474f9/go/extractor/util/util.go#L170-L180

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.