sclasen / swfsm

[golang] simple workflow finite state machines
MIT License
53 stars 14 forks source link

Compilation fails on master using Makefile #164

Closed ryanwalls closed 8 years ago

ryanwalls commented 8 years ago

When I checkout the latest and run make godep fails with this error:

Ryans-MacBook-Pro:swfsm ryan$ make
go fmt ./...
go get github.com/golang/lint/golint
goimports -w .
go get golang.org/x/tools/cmd/goimports
test -z "$(goimports -l -d ./activity ./fsm ./fsm/protobufserializer ./fsm/s3serializer ./handler ./log ./migrator ./poller ./sugar ./testing ./testing/mocks | tee /dev/stderr)"
go get github.com/tools/godep
godep go install ./...
godep: WARNING: Go version (go1.6) & $GO15VENDOREXPERIMENT=1 wants to enable the vendor experiment, but disabling because a Godep workspace (Godeps/_workspace) exists
# github.com/aws/aws-sdk-go/aws/awsutil
Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go:157: undefined: jmespath in jmespath.Search
godep: go exit status 2
make: *** [install] Error 1

I feel like I must be doing something obviously wrong since the build is clean on Travis CI...

sclasen commented 8 years ago

hmm, I get the following

[12:16:15 ] ~/code/src/github.com/sclasen/swfsm $ git pull origin master
From github.com:sclasen/swfsm
 * branch            master     -> FETCH_HEAD
Already up-to-date.
[12:17:21 ] ~/code/src/github.com/sclasen/swfsm $ make
go fmt ./...
go get github.com/golang/lint/golint
goimports -w .
go get golang.org/x/tools/cmd/goimports
test -z "$(goimports -l -d ./activity ./fsm ./fsm/protobufserializer ./fsm/s3serializer ./handler ./log ./migrator ./poller ./sugar ./testing ./testing/mocks | tee /dev/stderr)"
go get github.com/tools/godep
godep go install ./...
godep go test ./...
ok      github.com/sclasen/swfsm/activity       4.804s
ok      github.com/sclasen/swfsm/fsm    0.018s
ok      github.com/sclasen/swfsm/fsm/protobufserializer 0.009s
ok      github.com/sclasen/swfsm/fsm/s3serializer       0.011s
?       github.com/sclasen/swfsm/handler        [no test files]
?       github.com/sclasen/swfsm/log    [no test files]
ok      github.com/sclasen/swfsm/migrator       0.009s
ok      github.com/sclasen/swfsm/poller 0.011s
?       github.com/sclasen/swfsm/sugar  [no test files]
ok      github.com/sclasen/swfsm/testing        0.009s
?       github.com/sclasen/swfsm/testing/mocks  [no test files]

Can you unset GO15VENDOREXPERIMENT and see what happens, thats the only apparent difference

ryanwalls commented 8 years ago

When I unset, still get same error. Probably something on my local environment....

Other weird thing, it modifies some files when I run make.

Here's the git diff:

Ryans-MacBook-Pro:swfsm ryan$ git diff
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go
index 4d2a01e..e09be7e 100644
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go
@@ -5,8 +5,6 @@ import (
        "regexp"
        "strconv"
        "strings"
-
-       "github.com/jmespath/go-jmespath"
 )

 var indexRe = regexp.MustCompile(`(.+)\[(-?\d+)?\]$`)
diff --git a/Godeps/_workspace/src/github.com/jmespath/go-jmespath/fuzz/jmespath.go b/Godeps/_workspace/src/github.com/jmespath/go-jmespath/fuzz/jmespath.go
index c7df087..ed9360f 100644
--- a/Godeps/_workspace/src/github.com/jmespath/go-jmespath/fuzz/jmespath.go
+++ b/Godeps/_workspace/src/github.com/jmespath/go-jmespath/fuzz/jmespath.go
@@ -1,7 +1,5 @@
 package jmespath

-import "github.com/jmespath/go-jmespath"
-
 // Fuzz will fuzz test the JMESPath parser.
 func Fuzz(data []byte) int {
        p := jmespath.NewParser()
sclasen commented 8 years ago

Godeps (╯°□°)╯︵ ┻━┻

maybe try a godep restore ./... && git reset --hard HEAD && make ?

ryanwalls commented 8 years ago

That worked!

If you're up for trying a different dependency management tool, I've really liked https://github.com/Masterminds/glide so far.