-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Migrate to go modules #5069
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
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 |
…go-gitea#6525) ### Screenshot #### Before See go-gitea#5069. #### After  ### Tests - I added test coverage for Go changes... - [x] in their respective `*_test.go` for unit tests. - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server. - I added test coverage for JavaScript changes... - [ ] in `web_src/js/*.test.js` if it can be unit tested. - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)). - Manual testing: see https://codeberg.org/forgejo/forgejo/pulls/6525#issuecomment-2578814. Thanks @earl-warren. ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [ ] I do not want this change to show in the release notes. - [ ] I want the title to show in the release notes with a link to this pull request. - [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6525 Reviewed-by: Otto <[email protected]> Co-authored-by: Robert Wolff <[email protected]> Co-committed-by: Robert Wolff <[email protected]>
…go-gitea#6525) ### Screenshot #### Before See go-gitea#5069. #### After  ### Tests - I added test coverage for Go changes... - [x] in their respective `*_test.go` for unit tests. - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server. - I added test coverage for JavaScript changes... - [ ] in `web_src/js/*.test.js` if it can be unit tested. - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)). - Manual testing: see https://codeberg.org/forgejo/forgejo/pulls/6525#issuecomment-2578814. Thanks @earl-warren. ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [ ] I do not want this change to show in the release notes. - [ ] I want the title to show in the release notes with a link to this pull request. - [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6525 Reviewed-by: Otto <[email protected]> Co-authored-by: Robert Wolff <[email protected]> Co-committed-by: Robert Wolff <[email protected]> (cherry picked from commit c0a2108)
go-gitea#5069 (go-gitea#6739) **Backport:** https://codeberg.org/forgejo/forgejo/pulls/6525 ### Screenshot #### Before See go-gitea#5069. #### After  ### Tests - I added test coverage for Go changes... - [x] in their respective `*_test.go` for unit tests. - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server. - I added test coverage for JavaScript changes... - [ ] in `web_src/js/*.test.js` if it can be unit tested. - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)). - Manual testing: see https://codeberg.org/forgejo/forgejo/pulls/6525#issuecomment-2578814. Thanks @earl-warren. ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [ ] I do not want this change to show in the release notes. - [ ] I want the title to show in the release notes with a link to this pull request. - [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title. Co-authored-by: Robert Wolff <[email protected]> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6739 Reviewed-by: Robert Wolff <[email protected]> Co-authored-by: forgejo-backport-action <[email protected]> Co-committed-by: forgejo-backport-action <[email protected]>
Re: #5044
go mod init
andgo mod tidy
(addsgo.mod
andgo.sum
)