1
0
Fork 0
forked from forgejo/forgejo

[GITEA] Vendor rupture dependency

- The [rupture](https://github.com/ethantkoenig/rupture) dependency was
essentially outdated in the sense it was using old version of
dependencies.
- The usage by Forgejo was rather a small portion, so that portion is
now vendored (with its tests).
- Removes old dependencies from go.sum (less dependencies is better for
reviewing what the heck we're importing). Just to note that they were
likely not being used by Go's build process (according to
https://go.dev/ref/mod#minimal-version-selection), so it's really a
matter of formal cleaning up dependencies we don't use and therefor
don't want to download and be in our go.sum.

(cherry picked from commit aa72a5f009)

Conflicts:
	go.sum
	https://codeberg.org/forgejo/forgejo/pulls/2148
(cherry picked from commit fbe8d65f0b)
This commit is contained in:
Gusted 2024-01-08 15:53:32 +01:00 committed by Earl Warren
parent 598756833e
commit e18debcb6a
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
7 changed files with 85 additions and 70 deletions

View file

@ -12,7 +12,6 @@ import (
"github.com/blevesearch/bleve/v2"
"github.com/blevesearch/bleve/v2/index/upsidedown"
"github.com/ethantkoenig/rupture"
)
// openIndexer open the index at the specified path, checking for metadata
@ -26,7 +25,7 @@ func openIndexer(path string, latestVersion int) (bleve.Index, int, error) {
return nil, 0, err
}
metadata, err := rupture.ReadIndexMetadata(path)
metadata, err := readIndexMetadata(path)
if err != nil {
return nil, 0, err
}