ponzu
ponzu copied to clipboard
Zap v11 was deleted
go get -u github.com/ponzu-cms/ponzu/...
Return error after blevesearch/zap/v11 was deleted from git. Dependencies need to be updated
Yea, there's a lot of work that needs to be done to bring Ponzu up to speed with the latest in the Go modules world.
Alternatively, you may be able to git clone https://github.com/ponzu-cms/ponzu.git && cd ponzu && GO111MODULE=off go install ./...
The dependencies are vendored into the project source - though module support is not added.
Hi @nilslice,
I have just tried installing Ponzu with the main installation method and I've faced these same issues.
When trying to install using your alternate method, I am having the following issue:
$ git clone https://github.com/ponzu-cms/ponzu.git && cd ponzu && GO111MODULE=off go install ./...
Cloning into 'ponzu'...
remote: Enumerating objects: 41, done.
remote: Counting objects: 100% (41/41), done.
remote: Compressing objects: 100% (35/35), done.
remote: Total 7664 (delta 4), reused 15 (delta 2), pack-reused 7623
Receiving objects: 100% (7664/7664), 3.59 MiB | 3.92 MiB/s, done.
Resolving deltas: 100% (3959/3959), done.
../../../../../go/src/github.com/blevesearch/bleve/index/scorch/segment_plugin.go:22:2: cannot find package "github.com/blevesearch/zap/v11" in any of:
/snap/go/5646/src/github.com/blevesearch/zap/v11 (from $GOROOT)
/home/{$username}/go/src/github.com/blevesearch/zap/v11 (from $GOPATH)
Any ideas?
@IvoPereira Yes, you could use latest zap v11 from repo archive and unpack it to your $gopath folder:
github.com/blevesearch/zap/v11
After this do:
go get -u github.com/ponzu-cms/ponzu/...
Go get will return git checking error but all will work, tested in go 1.14.2
@IvoPereira Yes, you could use latest zap v11 from repo archive and unpack it to your $gopath folder:
github.com/blevesearch/zap/v11
After this do:
go get -u github.com/ponzu-cms/ponzu/...Go get will return git checking error but all will work, tested in go 1.14.2
Tried the workaround on a windows system with go1.14.3 windows/amd64 but unable to build ponzu, log attached. ponzu-build-errors.txt
Ubuntu 20.04 LTS, golang version 1.14.6
go get github.com/ponzu-cms/ponzu/... gives:
package github.com/blevesearch/zap/v11: cannot find package "github.com/blevesearch/zap/v11" in any of:
/snap/go/6123/src/github.com/blevesearch/zap/v11 (from $GOROOT)
/home/xxxxxx/go/src/github.com/blevesearch/zap/v11 (from $GOPATH)
package github.com/blevesearch/zap/v12: cannot find package "github.com/blevesearch/zap/v12" in any of:
/snap/go/6123/src/github.com/blevesearch/zap/v12 (from $GOROOT)
/home/xxxxxx/go/src/github.com/blevesearch/zap/v12 (from $GOPATH)
package github.com/blevesearch/zap/v13: cannot find package "github.com/blevesearch/zap/v13" in any of:
/snap/go/6123/src/github.com/blevesearch/zap/v13 (from $GOROOT)
/home/xxxxxx/go/src/github.com/blevesearch/zap/v13 (from $GOPATH)
I REALLY want to use this in the revamp of my company's website and was so excited to try it out ... only to run into this brick wall, and I am loathe to jump through a bunch of kludgy hoops to get it to work (that seems to violate the point of all of this, don't you think?).
I'm curious as to how anyone with a modern version of GO is expected to adopt this as their headless CMS backend.
It feels like this project is heading to the bit graveyard sigh.
Unfortunately (for us) the original maintainer stepped down and the company that acquired the project doesn't even seem to acknowledge its existence.
I have tried contacting their support and been met with canned responses (for another product!), basically a brick wall.
Hopefully someone in the community with the skills can fork it, fix it, and bring it back to life.
most packages are now using go modules alternative: you can create folders /ponzu_projects/test at the terminal: /ponzu_projects> go mod init test cd test /ponzu_projects/test> go get -u github.com/ponzu-cms/ponzu/... is expected to work correctly and ponzu new ponzu_projects/new_project
ponzu new ponzu_projects/new_project
Error: open cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/content: no such file or directory
EDIT: It builds without any error, but it didn't worked; when i'm generating content struct with "ponzu gen content ...", Content sidebar still empty.
This at least gets the custom content types showing up: https://github.com/kudzu-cms/kudzu/commit/f8e2569197a1a269c2c7cd6c5fc4bcfbcf5a431d
@amznms
most packages are now using go modules alternative: you can create folders /ponzu_projects/test at the terminal: /ponzu_projects> go mod init test cd test /ponzu_projects/test> go get -u github.com/ponzu-cms/ponzu/... is expected to work correctly and ponzu new ponzu_projects/new_project
I've seen you respond with this comment in a few places, but it doesn't actually work in getting 0.11.0 to build. it still fails with the lack of zap/vXX errors. Also, go mod init newmod doesn't create a folder for ./newmod, so the instruction to cd newmod is also incorrect.
@IvoPereira Yes, you could use latest zap v11 from repo archive and unpack it to your $gopath folder:
github.com/blevesearch/zap/v11
After this do:
go get -u github.com/ponzu-cms/ponzu/...Go get will return git checking error but all will work, tested in go 1.14.2Tried the workaround on a windows system with go1.14.3 windows/amd64 but unable to build ponzu, log attached. ponzu-build-errors.txt
Thanks you so much. I working on it and well done :D
I re-write Dockerfile in source for support everybody else can install them quickly follow this solution ^^
git clone source
Dockerfile
#syntax=docker/dockerfile:1.2
# Base our image on an official, minimal image of our preferred golang
FROM --platform=${BUILDPLATFORM} golang:1.14.3-alpine AS build
ARG TARGETOS
ARG TARGETARCH
ENV GOOS=${TARGETOS}
ENV GOARCH=${TARGETARCH}
ENV CGO_ENABLED=0
ENV GO_SRC $GOPATH/src
ENV GO_BIN $GOPATH/bin
ENV ZAPX_GITHUB github.com/blevesearch/zapx
ENV ZAPX_ROOT $GO_SRC/$ZAPX_GITHUB
RUN --mount=type=cache,target=/root/.cache/go-build apk add git
RUN --mount=type=cache,target=/root/.cache/go-build go get $ZAPX_GITHUB
WORKDIR $ZAPX_ROOT
RUN --mount=type=cache,target=/root/.cache/go-build git clone --branch v14.x https://$ZAPX_GITHUB v14
RUN --mount=type=cache,target=/root/.cache/go-build git clone --branch v13.x https://$ZAPX_GITHUB v13
RUN --mount=type=cache,target=/root/.cache/go-build git clone --branch v12.x https://$ZAPX_GITHUB v12
RUN --mount=type=cache,target=/root/.cache/go-build git clone --branch v11.x https://$ZAPX_GITHUB v11
# Note: The default golang docker image, already has the GOPATH env variable set.
# GOPATH is located at /go
ENV PONZU_GITHUB github.com/ponzu-cms/ponzu
ENV PONZU_ROOT $GO_SRC/$PONZU_GITHUB
# Consider updating package in the future. For instance ca-certificates etc.
# RUN apt-get update -qq && apt-get install -y build-essential
# Make the ponzu root directory
RUN mkdir -p $PONZU_ROOT
# All commands will be run inside of ponzu root
WORKDIR $PONZU_ROOT
# Copy the ponzu source into ponzu root.
COPY . .
# the following runs the code inside of the $GO_SRC/$PONZU_GITHUB directory
RUN --mount=type=cache,target=/root/.cache/go-build go get -u $PONZU_GITHUB...
FROM scratch AS bin
COPY --from=build /go/bin/ /bin
Script: docker build --progress=plain --output . --platform local .
Output is folder ./bin with binary ponzu inside
Thanks you so much. I working on it and well done :D
I re-write Dockerfile in source for support everybody else can install them quickly follow this solution ^^
git clone sourceDockerfile
#syntax=docker/dockerfile:1.2 # Base our image on an official, minimal image of our preferred golang FROM --platform=${BUILDPLATFORM} golang:1.14.3-alpine AS build ARG TARGETOS ARG TARGETARCH ENV GOOS=${TARGETOS} ENV GOARCH=${TARGETARCH} ENV CGO_ENABLED=0 ENV GO_SRC $GOPATH/src ENV GO_BIN $GOPATH/bin ENV ZAPX_GITHUB github.com/blevesearch/zapx ENV ZAPX_ROOT $GO_SRC/$ZAPX_GITHUB RUN --mount=type=cache,target=/root/.cache/go-build apk add git RUN --mount=type=cache,target=/root/.cache/go-build go get $ZAPX_GITHUB WORKDIR $ZAPX_ROOT RUN --mount=type=cache,target=/root/.cache/go-build git clone --branch v14.x https://$ZAPX_GITHUB v14 RUN --mount=type=cache,target=/root/.cache/go-build git clone --branch v13.x https://$ZAPX_GITHUB v13 RUN --mount=type=cache,target=/root/.cache/go-build git clone --branch v12.x https://$ZAPX_GITHUB v12 RUN --mount=type=cache,target=/root/.cache/go-build git clone --branch v11.x https://$ZAPX_GITHUB v11 # Note: The default golang docker image, already has the GOPATH env variable set. # GOPATH is located at /go ENV PONZU_GITHUB github.com/ponzu-cms/ponzu ENV PONZU_ROOT $GO_SRC/$PONZU_GITHUB # Consider updating package in the future. For instance ca-certificates etc. # RUN apt-get update -qq && apt-get install -y build-essential # Make the ponzu root directory RUN mkdir -p $PONZU_ROOT # All commands will be run inside of ponzu root WORKDIR $PONZU_ROOT # Copy the ponzu source into ponzu root. COPY . . # the following runs the code inside of the $GO_SRC/$PONZU_GITHUB directory RUN --mount=type=cache,target=/root/.cache/go-build go get -u $PONZU_GITHUB... FROM scratch AS bin COPY --from=build /go/bin/ /binScript:
docker build --progress=plain --output . --platform local .Output is folder ./bin with binary ponzu inside
I was trying to use the Dockerfile you posted here but encountered the error:
sudo docker build --progress=plain --output . --platform local . Sending build context to Docker daemon 14.23MB Error response from daemon: "local": unknown operating system or architecture: invalid argument
Is it because that I didn't set platform flag correctly? Was trying to change local to sth like linux/amd64 but it didn't work out.
Thanks you so much. I working on it and well done :D I re-write Dockerfile in source for support everybody else can install them quickly follow this solution ^^
git clone sourceDockerfile#syntax=docker/dockerfile:1.2 # Base our image on an official, minimal image of our preferred golang FROM --platform=${BUILDPLATFORM} golang:1.14.3-alpine AS build ARG TARGETOS ARG TARGETARCH ENV GOOS=${TARGETOS} ENV GOARCH=${TARGETARCH} ENV CGO_ENABLED=0 ENV GO_SRC $GOPATH/src ENV GO_BIN $GOPATH/bin ENV ZAPX_GITHUB github.com/blevesearch/zapx ENV ZAPX_ROOT $GO_SRC/$ZAPX_GITHUB RUN --mount=type=cache,target=/root/.cache/go-build apk add git RUN --mount=type=cache,target=/root/.cache/go-build go get $ZAPX_GITHUB WORKDIR $ZAPX_ROOT RUN --mount=type=cache,target=/root/.cache/go-build git clone --branch v14.x https://$ZAPX_GITHUB v14 RUN --mount=type=cache,target=/root/.cache/go-build git clone --branch v13.x https://$ZAPX_GITHUB v13 RUN --mount=type=cache,target=/root/.cache/go-build git clone --branch v12.x https://$ZAPX_GITHUB v12 RUN --mount=type=cache,target=/root/.cache/go-build git clone --branch v11.x https://$ZAPX_GITHUB v11 # Note: The default golang docker image, already has the GOPATH env variable set. # GOPATH is located at /go ENV PONZU_GITHUB github.com/ponzu-cms/ponzu ENV PONZU_ROOT $GO_SRC/$PONZU_GITHUB # Consider updating package in the future. For instance ca-certificates etc. # RUN apt-get update -qq && apt-get install -y build-essential # Make the ponzu root directory RUN mkdir -p $PONZU_ROOT # All commands will be run inside of ponzu root WORKDIR $PONZU_ROOT # Copy the ponzu source into ponzu root. COPY . . # the following runs the code inside of the $GO_SRC/$PONZU_GITHUB directory RUN --mount=type=cache,target=/root/.cache/go-build go get -u $PONZU_GITHUB... FROM scratch AS bin COPY --from=build /go/bin/ /binScript:
docker build --progress=plain --output . --platform local .Output is folder ./bin with binary ponzu insideI was trying to use the Dockerfile you posted here but encountered the error:
sudo docker build --progress=plain --output . --platform local . Sending build context to Docker daemon 14.23MB Error response from daemon: "local": unknown operating system or architecture: invalid argumentIs it because that I didn't set platform flag correctly? Was trying to change
localto sth likelinux/amd64but it didn't work out.
Sorry, I forgot mention the version and config for Docker When I write Dockerfile, I reference to this guidline https://www.docker.com/blog/tag/go-env-series/ With enable DOCKER_BUILDKIT and Docker version Docker version 20.10.6, build 370c289
You can try this reference guidline and hope them can help you ^^
after cloning the repo try following
go mod init github.com/ponzu-cms/ponzu
go mod tidy
go install ./...