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

[WIP] Migrate to go mod #626

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

dpordomingo
Copy link
Contributor

@dpordomingo dpordomingo commented Apr 10, 2019

fix #592
depends on #631
caused by https://github.com/src-d/backlog/issues/1392
blocked by src-d/go-git-fixtures#15

  1. go mod init to create go.mod
    1. go.mod: add replace github.com/Sirupsen/logrus => github.com/sirupsen/logrus latest
    2. go.mod: add replace google.golang.org/cloud => cloud.google.com/go latest
    3. modify github.com/google/go-github to be github.com/google/go-github/v24 in go.mod and in all imports of Lookout
  2. go mod tidy
  3. go mod vendor

TODO:

building an inventory of dependencies that were automatically added/dropped/updated during the process.

The purpose of Makefile.web is to test and build
Lookout web, but it was also testing and building
the whole Lookout because Makefile.web includes
Makefile, and that one includes src-d/ci/Makefile.main

This commit overrides Makefile.main::build,
Makefile.main::test and Makefile.main::dependencies
targets to avoid calling them when using Makefile.web

Signed-off-by: David Pordomingo <[email protected]>
Signed-off-by: David Pordomingo <[email protected]>
Signed-off-by: David Pordomingo <[email protected]>
Signed-off-by: David Pordomingo <[email protected]>
It will be used `make vendor` to 'tidy', add dependencies into 'vendor'
and verify that they matches their integrity checks

Signed-off-by: David Pordomingo <[email protected]>
kallax models should be generated with 'make generate-go',
kallax migrations should be generated with
'MIGRTION_NAME=<name> make generate-migrations' and packed
with 'make pack-migrations'

All the code generation: kallax and vendor can be done
at once with 'make generate'

kallax does not work with go Modules, so it'll be disabled
issue: src-d/go-kallax#296

Signed-off-by: David Pordomingo <[email protected]>
Otherwise 'esc' and 'kallax' wont be installed properly
and they will be added into 'go.mod'

Signed-off-by: David Pordomingo <[email protected]>
Instead of using traditional 'go get', with 'go Modules' it can
be locked the tools used by the project in a standard way.

Project dependencies will be added into './build/tools/bin'

Signed-off-by: David Pordomingo <[email protected]>
Signed-off-by: David Pordomingo <[email protected]>
Signed-off-by: David Pordomingo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate to go mod
1 participant