You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.
# clone outside GOPATH
$ git clone https://github.com/Azure/draft
$ cd draft
$ go mod init github.com/Azure/draft
go mod will then copy the dependency requirements from the existing Gopkg.lock.
$ go mod tidy
to clean up the dependencies , add missing ones and mark indirect dependencies.
The results are this go.mod and this go.sum.
Now I can build and run draft outside the gopath.
$ go build ./...
$ go run ./cmd/draft
(I previously mentioned some dependency issues here but it turns out these were based on wrong assumptions - I thought I was already importing my fork with modules support but I was actually importing the remote version.) For documentation purposes I've stored them here)
The text was updated successfully, but these errors were encountered:
Remaining issues with running the project outside of the gopath:
make bootstrap won't work - but it is also not required, as go modules will make sure all the dependencies are installed. It can still be used
failing unit tests (make test-unit)
--- FAIL: TestStoreCreateBuild (0.00s)
store_test.go:128: failed equality for CreateBuild
--- FAIL: TestStoreUpdateBuild (0.00s)
store_test.go:128: failed equality for UpdateBuild
I'm not entirely sure why they fail. I haven't been able to spot anything usually handled by make bootstrap that would've been required.
The structs appear equal when I have a look at their fields.
We're currently experimenting with migrating to go modules in Helm and have some concerns about maintaining the project compared to dep's approach to dependency management, so we haven't invested much time in here. Once we're more familiar with go mod we should be able to provide more opinions here for Draft
make bootstrap can go away with go mod. That's not an issue :)
feel free to PR what you have. Perhaps someone from the community could take a look and provide some insight to your failed tests
I looked into the failing tests and the reason they are failing is a field called XXX_sizecache within CreatedAt and for the obj it has a value of 12 and for got is has a value of 0.
Hi, I'm currently working on updating draft to work with go modules.
This is the current progress:
Following the official documentation, I went through the following process:
go mod will then copy the dependency requirements from the existing
Gopkg.lock
.to clean up the dependencies , add missing ones and mark indirect dependencies.
The results are this go.mod and this go.sum.
Now I can build and run draft outside the gopath.
(I previously mentioned some dependency issues here but it turns out these were based on wrong assumptions - I thought I was already importing my fork with modules support but I was actually importing the remote version.) For documentation purposes I've stored them here)
The text was updated successfully, but these errors were encountered: