Migrate from dep to golang modules (vgo) #2390

Closed
opened 2025-11-02 04:34:34 -06:00 by GiteaMirror · 14 comments
Owner

Originally created by @lafriks on GitHub (Oct 9, 2018).

Originally created by @lafriks on GitHub (Oct 9, 2018).
GiteaMirror added the topic/build label 2025-11-02 04:34:34 -06:00
Author
Owner

@coolaj86 commented on GitHub (Oct 9, 2018):

Hey! I already did that in my local branch and it was super easy. Takes about 10 minutes (mostly parsing and downloading deps).

go mod init

But then updating docker and all that... not quite as quick perhaps.

I'll make a PR for as far as I got, but it'll be missing some things, of course.

@coolaj86 commented on GitHub (Oct 9, 2018): Hey! I already did that in my local branch and it was super easy. Takes about 10 minutes (mostly parsing and downloading deps). ``` go mod init ``` But then updating docker and all that... not quite as quick perhaps. I'll make a PR for as far as I got, but it'll be missing some things, of course.
Author
Owner

@lunny commented on GitHub (Oct 9, 2018):

So when 1.7.0 is coming, we will drop go1.10 support.

@lunny commented on GitHub (Oct 9, 2018): So when 1.7.0 is coming, we will drop go1.10 support.
Author
Owner

@lafriks commented on GitHub (Oct 9, 2018):

@coolaj86 yes updating drone build steps including step for checking if dependencies are correct also needs to be fixed

@lafriks commented on GitHub (Oct 9, 2018): @coolaj86 yes updating drone build steps including step for checking if dependencies are correct also needs to be fixed
Author
Owner

@coolaj86 commented on GitHub (Oct 11, 2018):

go: converting Gopkg.lock: stat github.com/boltdb/bolt@ccd680d8c1a0179ac3d68f692b01e1a1589cbfc7: unknown revision ccd680d8c1a0179ac3d68f692b01e1a1589cbfc7

Do we have a custom patched version of boltdb committed to the repo?

@coolaj86 commented on GitHub (Oct 11, 2018): ``` go: converting Gopkg.lock: stat github.com/boltdb/bolt@ccd680d8c1a0179ac3d68f692b01e1a1589cbfc7: unknown revision ccd680d8c1a0179ac3d68f692b01e1a1589cbfc7 ``` Do we have a custom patched version of boltdb committed to the repo?
Author
Owner

@techknowlogick commented on GitHub (Oct 11, 2018):

@coolaj86 iirc yes https://github.com/go-gitea/bolt

@techknowlogick commented on GitHub (Oct 11, 2018): @coolaj86 iirc yes https://github.com/go-gitea/bolt
Author
Owner

@coolaj86 commented on GitHub (Oct 11, 2018):

Actually... we don't.

rg bolt
Gopkg.lock
111:    "index/store/boltdb",
149:  name = "github.com/boltdb/bolt"
153:  source = "github.com/go-gitea/bolt"

Gopkg.toml
91:  name = "github.com/boltdb/bolt"
93:  source = "github.com/go-gitea/bolt"

The only place it shows up is in the lock file.

@coolaj86 commented on GitHub (Oct 11, 2018): Actually... we don't. ``` rg bolt Gopkg.lock 111: "index/store/boltdb", 149: name = "github.com/boltdb/bolt" 153: source = "github.com/go-gitea/bolt" Gopkg.toml 91: name = "github.com/boltdb/bolt" 93: source = "github.com/go-gitea/bolt" ``` The only place it shows up is in the lock file.
Author
Owner

@techknowlogick commented on GitHub (Oct 11, 2018):

oh you know what that dependency might have been removed when tidb was removed.

@techknowlogick commented on GitHub (Oct 11, 2018): oh you know what that dependency might have been removed when tidb was removed.
Author
Owner

@coolaj86 commented on GitHub (Oct 11, 2018):

I see that bleve also uses bolt. Should I assume that our bolt modifications for tidb and not for bleve?

@coolaj86 commented on GitHub (Oct 11, 2018): I see that `bleve` also uses bolt. Should I assume that our `bolt` modifications for `tidb` and not for `bleve`?
Author
Owner

@techknowlogick commented on GitHub (Oct 11, 2018):

the modifications were so that bolt builds on mips platforms, but maybe it's time to use https://github.com/etcd-io/bbolt instead (if bleve supports it)

@techknowlogick commented on GitHub (Oct 11, 2018): the modifications were so that bolt builds on mips platforms, but maybe it's time to use https://github.com/etcd-io/bbolt instead (if bleve supports it)
Author
Owner

@coolaj86 commented on GitHub (Oct 11, 2018):

I was hoping to be able to use go mods new replace feature, but it looks like we'll still have to have a gitea version if nothing more than to rename the package from bbolt back to bolt: https://github.com/etcd-io/bbolt/issues/129

Or the bleve maintainers will have to migrate: https://github.com/blevesearch/bleve/issues/783

@coolaj86 commented on GitHub (Oct 11, 2018): I was hoping to be able to use `go mod`s new `replace` feature, but it looks like we'll still have to have a gitea version if nothing more than to rename the package from `bbolt` back to `bolt`: https://github.com/etcd-io/bbolt/issues/129 Or the bleve maintainers will have to migrate: https://github.com/blevesearch/bleve/issues/783
Author
Owner

@techknowlogick commented on GitHub (Oct 20, 2018):

@coolaj86 As you can see from my comment in the (bleve) ticket you linked I created a PR to upgrade to use bbolt, however I'm having some trouble with failing tests. If you are keen on solving those issues I can give you access to my fork.

@techknowlogick commented on GitHub (Oct 20, 2018): @coolaj86 As you can see from my comment in the (bleve) ticket you linked I created a PR to upgrade to use bbolt, however I'm having some trouble with failing tests. If you are keen on solving those issues I can give you access to my fork.
Author
Owner

@coolaj86 commented on GitHub (Oct 20, 2018):

@techknowlogick give me access and I’ll try it out.

I have minimal experience with bleve and no experience with bbolt, but I’ll poke around a little and see what I see.

@coolaj86 commented on GitHub (Oct 20, 2018): @techknowlogick give me access and I’ll try it out. I have minimal experience with bleve and no experience with bbolt, but I’ll poke around a little and see what I see.
Author
Owner

@techknowlogick commented on GitHub (Oct 20, 2018):

@coolaj86 thanks 😄

@techknowlogick commented on GitHub (Oct 20, 2018): @coolaj86 thanks 😄
Author
Owner

@techknowlogick commented on GitHub (Feb 14, 2019):

blevesearch/bleve#783 has successfully been completed, which means we can drop support for regular bolt, and just use bbolt for everything!

@techknowlogick commented on GitHub (Feb 14, 2019): blevesearch/bleve#783 has successfully been completed, which means we can drop support for regular bolt, and just use bbolt for everything!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2390