[PR #1468] [MERGED] Check if missing/modified/unused deps in vendor and fix errors #15918

Closed
opened 2025-11-02 11:57:50 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/1468
Author: @sapk
Created: 4/8/2017
Status: Merged
Merged: 4/24/2017
Merged by: @lunny

Base: masterHead: check-missing-vendor


📝 Commits (10+)

  • f874dc4 Check if missing deps in vendor
  • 6b97c34 Remove github.com/smartystreets unused deps
  • 663b560 Remove github.com/boltdb/bolt unused dep
  • 147792f Fetch github.com/go-xorm/core + sync gopkg.in/ldap.v2/ldap.go
  • e4730f2 Auto-install govendor + reinstall github.com/boltdb/bolt needed by vendor/github.com/blevesearch/bleve/index/store/boltdb
  • 6b655e4 Update go-xorm/xorm to a5cb21 in vendor.json
  • 2e46744 Use a custom repo for implementing change to bolt dep.
  • 66338d6 Switching bolt to github.com/go-gitea/bolt
  • c1cafd9 Switching bolt to github.com/go-gitea/bolt (fork version)
  • 8fec744 change the drone sign

📊 Changes

6 files changed (+22 additions, -37 deletions)

View changed files

📝 .drone.yml (+1 -0)
📝 .drone.yml.sig (+1 -1)
📝 Makefile (+7 -0)
📝 vendor/github.com/go-xorm/core/dialect.go (+2 -2)
📝 vendor/gopkg.in/ldap.v2/ldap.go (+1 -1)
📝 vendor/vendor.json (+10 -33)

📄 Description

I was planning to add a check in makefile for Ci to check vendoring changes because it is difficult to check all import and validate vendoring in PR. For example, the change in makefile (test) would catch any missing vendoring or vendoring without editing vendor.json or any vendor that could be removed after a change.

Doing that I found that govendor status +outside +unused returns on master :

The following packages are missing or modified locally:
	github.com/boltdb/bolt
	github.com/go-xorm/core
	github.com/smartystreets/assertions/internal/go-render/render
	github.com/smartystreets/assertions/internal/oglematchers
	github.com/smartystreets/goconvey/convey/gotest
	github.com/smartystreets/goconvey/convey/reporting
	gopkg.in/ldap.v2
Error: status failed for 7 package(s)

So I am adding fix of vendor :

  • Revome un-used import github.com/smartystreets (used for tests in gogs)
  • Remove github.com/boltdb/bolt unused dep Fetch github.com/boltdb/bolt
  • github.com/go-xorm/core Is on a commit from a PR not from master : https://github.com/go-xorm/core/pull/21 -> fetch last commit
  • sync gopkg.in/ldap.v2/ldap.go since a comment seems to be different in vendor than remote source.

After rebasing and looking at failing drone I found that PR #1448 put to a5cb21c@go-xorm/xorm for files but vendor.json (https://github.com/go-gitea/gitea/blob/master/vendor/vendor.json#L460) to 7e70eb. So I update it and it is a good illustration of difficult to catch error. ^^


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/1468 **Author:** [@sapk](https://github.com/sapk) **Created:** 4/8/2017 **Status:** ✅ Merged **Merged:** 4/24/2017 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `check-missing-vendor` --- ### 📝 Commits (10+) - [`f874dc4`](https://github.com/go-gitea/gitea/commit/f874dc42954b3b08957a13a0fffb1a003f8f5f9d) Check if missing deps in vendor - [`6b97c34`](https://github.com/go-gitea/gitea/commit/6b97c34046eaca018c7d2e94103c73e52787c60b) Remove github.com/smartystreets unused deps - [`663b560`](https://github.com/go-gitea/gitea/commit/663b5604ceaaf785ea45c57f2432d83f2329a302) Remove github.com/boltdb/bolt unused dep - [`147792f`](https://github.com/go-gitea/gitea/commit/147792f9fb4f60effd365956bc7fceb9c49ae879) Fetch github.com/go-xorm/core + sync gopkg.in/ldap.v2/ldap.go - [`e4730f2`](https://github.com/go-gitea/gitea/commit/e4730f2baa251c2fdb1ef73a3e7fcbe532f023ac) Auto-install govendor + reinstall github.com/boltdb/bolt needed by vendor/github.com/blevesearch/bleve/index/store/boltdb - [`6b655e4`](https://github.com/go-gitea/gitea/commit/6b655e42db056b6df97b7075493266561d7f6adc) Update go-xorm/xorm to a5cb21 in vendor.json - [`2e46744`](https://github.com/go-gitea/gitea/commit/2e467446293c8b54da3b14a1addb511aa25c718a) Use a custom repo for implementing change to bolt dep. - [`66338d6`](https://github.com/go-gitea/gitea/commit/66338d682283ccc098cdb5f2f6575ea657fa7f02) Switching bolt to github.com/go-gitea/bolt - [`c1cafd9`](https://github.com/go-gitea/gitea/commit/c1cafd9acf527211ba45fae68cc65292d43ba11d) Switching bolt to github.com/go-gitea/bolt (fork version) - [`8fec744`](https://github.com/go-gitea/gitea/commit/8fec744dbc9f2467cf8d25776f35980a6156f7ff) change the drone sign ### 📊 Changes **6 files changed** (+22 additions, -37 deletions) <details> <summary>View changed files</summary> 📝 `.drone.yml` (+1 -0) 📝 `.drone.yml.sig` (+1 -1) 📝 `Makefile` (+7 -0) 📝 `vendor/github.com/go-xorm/core/dialect.go` (+2 -2) 📝 `vendor/gopkg.in/ldap.v2/ldap.go` (+1 -1) 📝 `vendor/vendor.json` (+10 -33) </details> ### 📄 Description I was planning to add a check in makefile for Ci to check vendoring changes because it is difficult to check all import and validate vendoring in PR. For example, the change in makefile (test) would catch any missing vendoring or vendoring without editing vendor.json or any vendor that could be removed after a change. Doing that I found that `govendor status +outside +unused ` returns on master : ``` The following packages are missing or modified locally: github.com/boltdb/bolt github.com/go-xorm/core github.com/smartystreets/assertions/internal/go-render/render github.com/smartystreets/assertions/internal/oglematchers github.com/smartystreets/goconvey/convey/gotest github.com/smartystreets/goconvey/convey/reporting gopkg.in/ldap.v2 Error: status failed for 7 package(s) ``` So I am adding fix of vendor : - [x] Revome un-used import github.com/smartystreets (used for tests in gogs) - [x] ~~Remove github.com/boltdb/bolt unused dep~~ Fetch github.com/boltdb/bolt - [X] github.com/go-xorm/core Is on a commit from a PR not from master : https://github.com/go-xorm/core/pull/21 -> fetch last commit - [X] sync gopkg.in/ldap.v2/ldap.go since a comment seems to be different in vendor than remote source. After rebasing and looking at failing drone I found that PR #1448 put to a5cb21c@go-xorm/xorm for files but vendor.json (https://github.com/go-gitea/gitea/blob/master/vendor/vendor.json#L460) to 7e70eb. So I update it and it is a good illustration of difficult to catch error. ^^ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 11:57:50 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15918