New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate to go modules #5069
Migrate to go modules #5069
Conversation
@@ -1,3 +1,5 @@ | |||
vendor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO we shouldn't remove the vendor dir.
If a dependency or its host goes down, we can't build Gitea anymore.
Please update the makefile in order to make sure that our CI tasks are going to work. |
@@ -172,23 +172,6 @@ coverage: | |||
unit-test-coverage: | |||
for PKG in $(PACKAGES); do $(GO) test -tags=sqlite -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG || exit 1; done; | |||
|
|||
.PHONY: vendor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't remove the vendor and test-vendor tasks.
@@ -21,7 +21,6 @@ import ( | |||
"code.gitea.io/gitea/routers/routes" | |||
|
|||
"github.com/Unknwon/com" | |||
context2 "github.com/gorilla/context" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't these changes from https://github.com/go-gitea/gitea/pull/5068/files#diff-da541ef36e39344f2e12bddd91d363e2 ?
Since Gitea depends on so many Go libraries. I would like to keep vendor to use |
@coolaj86 Add build test in Drone build-with-go-module:
image: golang:1.11
pull: true
environment:
- TAGS="bindata sqlite"
- GO111MODULE=on
commands:
- make clean
- make generate
- make build
when:
event: [ push, tag, pull_request ] |
As @lunny suggests indeed it is good to cache also in the |
@@ -56,7 +56,7 @@ pipeline: | |||
event: [ push, tag, pull_request ] | |||
|
|||
build-without-gcc: | |||
image: golang:1.9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you keep this pegged at 1.9 as it is currently the oldest version of go that is supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(but the others can remain at 1.11 as we just need to ensure that 1.9 builds, but we will distribute the versions of gitea that are built with a more recent version)
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
Closing due to #5743 |
Re: #5044
go mod init
andgo mod tidy
(addsgo.mod
andgo.sum
)