oxequa / realize

Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.
GNU General Public License v3.0
4.46k stars 229 forks source link

Issues with downstream installation of echo web framework on linux/docker #239

Open michaelperret opened 5 years ago

michaelperret commented 5 years ago

Error:

Step 9/10 : RUN go get github.com/oxequa/realize
 ---> Running in <CONTAINER_ID>
package github.com/labstack/echo/v4: cannot find package "github.com/labstack/echo/v4" in any of:
    /usr/local/go/src/github.com/labstack/echo/v4 (from $GOROOT)
    /go/src/github.com/labstack/echo/v4 (from $GOPATH)

Dockerfile:

FROM golang:1.10.0-alpine3.7

ENV CGO_ENABLED=0\
    GOOS=linux

WORKDIR /go/src/github.com/<WORKDIR>

# Add rest of source code
COPY . ./

ENV PORT 80
EXPOSE 80

# installing realize (for live reloading)
RUN apk add --no-cache git
RUN go get github.com/oxequa/realize

# launching realize
CMD [ "realize", "start" ]

go env:

GOARCH="amd64" 
GOBIN="" 
GOCACHE="/root/.cache/go-build" 
GOEXE="" 
GOHOSTARCH="amd64" 
GOHOSTOS="linux" 
GOOS="linux" 
GOPATH="/go" 
GORACE="" 
GOROOT="/usr/local/go" 
GOTMPDIR="" 
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" 
GCCGO="gccgo" 
CC="gcc" 
CXX="g++" 
CGO_ENABLED="0" 
CGO_CFLAGS="-g -O2" 
CGO_CPPFLAGS="" 
CGO_CXXFLAGS="-g -O2" 
CGO_FFLAGS="-g -O2" 
CGO_LDFLAGS="-g -O2" 
PKG_CONFIG="pkg-config" 
GOGCCFLAGS="-fPIC -m64 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build400087518=/tmp/go-build -gno-record-gcc-switches"

The issues seem to stem from the v4.0.0 release of labstack/echo here https://github.com/labstack/echo/commit/6d9e043284aea2d07f5fcaf0d3a424eb7d9f6109

erikdubbelboer commented 5 years ago

I'm thinking this is more an issue with github.com/labstack/echo who seem to have just broken all their existing users 😢 Can you make an issue there?

michaelperret commented 5 years ago

There's a thread on their forum addressing it https://forum.labstack.com/t/problem-with-the-new-update/789/3 and the maintainer seems adamant that this is not an issue with their repository.

It seems like an issue with the dependency management chain somewhere (which I'm confused by as the Gopkg.toml file for this repo specifies v3.3.5)

erikdubbelboer commented 5 years ago

Try using my maintained fork which uses go modules already: https://github.com/erikdubbelboer/realize

michaelperret commented 5 years ago

👍 I'll take a look, thanks @erikdubbelboer! Speaking of being maintained, any idea what the status of the repo here is? Looks like there hasn't been much activity for a few months now

cc: @Asoseil

teelau commented 5 years ago

I'm getting the same issue when trying to go get github.com/oxequa/realize, is there an update for a fix to this?

edit: It seems to be fixed after tagging golang 1.11 in the Dockerfile: FROM golang:1.11