commit | ed78f5d4bc8324942f946f97f604efe5b8e9d5c5 | [log] [tgz] |
---|---|---|
author | Zvonimir Pavlinovic <zpavlinovic@google.com> | Fri Aug 23 18:46:17 2024 +0000 |
committer | Gopher Robot <gobot@golang.org> | Fri Aug 23 21:00:56 2024 +0000 |
tree | 1460991101f9466bbf5efda6eafbf5c15c1bcae0 | |
parent | f38f6997cf128f7bd5964bdcdd046f3a619ab0fc [diff] |
internal/modules: exclude vendor directories in downloaded modules For modules that have vendor directories, ecosystem metrics always results in a loading error. 1% of the whole ecosystem has vendored dependencies. Vendor directories in modules downloaded from module proxy can have only one file: modules.txt. When package loading logic sees a vendor directory, it assumes the dependencies are there. Because they are in fact not, loading of packages fails. We hence remove the vendor directories altogether. This also makes sense because, starting from go1.24, we'll see modules with vendor directories being in principle empty, hence not even appearing in the downloaded zip files. This change skips unzipping the vendor directory when the module is downloaded. An alternative approach is to explicitly delete the vendor directory when analyzing the module. However, that has experimentally proven unsuccessful. There is likely a file permission error. Change-Id: I49d1f60e0e1679e586b14724f9fb729b2a8738df Reviewed-on: https://go-review.googlesource.com/c/pkgsite-metrics/+/608095 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Zvonimir Pavlinovic <zpavlinovic@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
This repository contains code that enables collecting and evaluating metrics for the Go ecosystem.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the time repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/pkgsite-metrics:” in the subject line, so it is easy to find.