Skip to content
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

Closed
wants to merge 5 commits into from
Closed

Migrate to go modules #5069

wants to merge 5 commits into from

Conversation

coolaj86
Copy link
Contributor

Re: #5044

  • remove a few unused modules (bolt, gorilla)
  • go mod init and go mod tidy (adds go.mod and go.sum)
  • remove Gopkg.*
  • update drone file? (doesn't look like there was much to do)

@lunny lunny added the topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile label Oct 11, 2018
@@ -1,3 +1,5 @@
vendor
Copy link
Member

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.

@bkcsoft bkcsoft added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 11, 2018
@jonasfranz
Copy link
Member

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
Copy link
Member

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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lunny
Copy link
Member

lunny commented Oct 11, 2018

Since Gitea depends on so many Go libraries. I would like to keep vendor to use go mod vendor.

@appleboy
Copy link
Member

@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 ]

@xor-gate
Copy link
Contributor

As @lunny suggests indeed it is good to cache also in the vendor folder. Because when somebody decides to pull the plug out of a dependency you are screwed.

@@ -56,7 +56,7 @@ pipeline:
event: [ push, tag, pull_request ]

build-without-gcc:
image: golang:1.9
Copy link
Member

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.

Copy link
Member

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)

@stale
Copy link

stale bot commented Jan 4, 2019

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.

@stale stale bot added the issue/stale label Jan 4, 2019
@typeless typeless mentioned this pull request Jan 16, 2019
@techknowlogick
Copy link
Member

Closing due to #5743

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/stale lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants