github / github/codeql

Go autobuild tries to download module dependencies twice

オープン
#11,991 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
question
主要言語
CodeQL
スター
10.1k
フォーク
2.1k
平均マージ
2日 15時間
マージ済み PR(30日)
141

説明

**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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。