echocat / gradle-golang-plugin

Gradle plugin to build, test and do other stuff of Golang projects.
https://github.com/echocat/gradle-golang-plugin
Mozilla Public License 2.0
44 stars 8 forks source link

Dependency issue when testing with Gradle while native Go tests succeed #24

Open tglaeser opened 7 years ago

tglaeser commented 7 years ago

I believe there is a dependency issue when building with Gradle that otherwise does not exist.

To reproduce ...

$ mkdir -p $GOPATH/src/github.com/tendermint
$ git clone https://github.com/tendermint/tendermint $GOPATH/src/github.com/tendermint/tendermint
$ cd $GOPATH/src/github.com/tendermint/tendermint
$ git checkout develop
$ git pull
$ glide install
$ go install ./cmd/tendermint
$ go test ./mempool
ok      github.com/tendermint/tendermint/mempool        0.218s
$ gradle --no-daemon build
...
:baseTest FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':baseTest'.
> At least one test failed (see log).

File $GOPATH/src/github.com/tendermint/build.gradle is

plugins {
  id "org.echocat.golang" version "0.1.15"
}
group 'github.com/tendermint/tendermint'
golang {
    toolchain {
        goroot = '/cygdrive/c/opt/go'
    }
    build {
        useTemporaryGopath = false
    }
}

Reviewing file build/testing/test.log show that previously successful test github.com/tendermint/tendermint/mempool now fails with a compile error ...

# github.com/tendermint/tendermint/proxy src/github.com/tendermint/tendermint/proxy/app_conn.go:143: cannot use reqQuery (type types.RequestQuery) as type []byte in argument to app.appConn.QuerySync src/github.com/tendermint/tendermint/proxy/app_conn.go:143: not enough arguments to return have (types.Result) want (types.ResponseQuery, error) src/github.com/tendermint/tendermint/proxy/client.go:76: undefined: types.NewBaseApplication FAIL github.com/tendermint/tendermint/mempool [build failed]

There were changes recently done to the code with respect to types.ResponseQuery. What I don't understand is why this only fails when building with Gradle.

Please advise. Thanks.

tglaeser commented 7 years ago

Do you have an update for me? Is the plugin still actively maintained/developed?

blaubaer commented 7 years ago

Hey @tglaeser: Currently I does not explicitly work on this issue but I still maintain/develop this project. I still focused on older issues at first. 😄