writefreely / documentation

WriteFreely documentation
https://writefreely.org/docs
Other
17 stars 12 forks source link

Development Setup failed during "go get" #36

Closed ownia closed 3 years ago

ownia commented 3 years ago

Describe the bug

following the guide to https://writefreely.org/docs/latest/developer/setup step to build from source and failed.

Steps to reproduce (if necessary)

run "go get -d github.com/writeas/writefreely/cmd/writefreely" and it occurs:

➜  /usr/local/go/src go get -d github.com/writeas/writefreely/cmd/writefreely

go: downloading github.com/writeas/writefreely v0.13.1
go: found github.com/writeas/writefreely/cmd/writefreely in github.com/writeas/writefreely v0.13.1
go get: github.com/writeas/writefreely@v0.13.1: parsing go.mod:
    module declares its path as: github.com/writefreely/writefreely
            but was required as: github.com/writeas/writefreely

Expected behavior

Application configuration

I build this on silicon arm64 macos. go version:

➜  /usr/local/go/src go version
go version go1.15.6 darwin/amd64
thebaer commented 3 years ago

Thanks, @ownia. Yes the repo moved, so the correct command would be:

go get -d github.com/writefreely/writefreely/cmd/writefreely

If anyone wants to fix this, please feel free! Just let us know you'd like to fix it, and then update developer/setup.md with the correct instructions. Otherwise I'll take care of it when I get a chance.

ownia commented 3 years ago

I found that the cmd at https://writefreely.org/docs/latest/developer/setup this page is

go get -d github.com/writeas/writefreely/cmd/writefreely

but at https://github.com/writefreely/documentation/blob/master/developer/setup.md it seem like a correct version

go get -d github.com/writefreely/writefreely/cmd/writefreely

So I wonder whther it needs a depoly sync in fact?

ownia commented 3 years ago

plus, after go get -d github.com/writefreely/writefreely/cmd/writefreely, I do not find a writefreely folder under $GOPATH/src/github.com, but $GOPATH/pkg/mod/github.com has writefreely and writeas. so I run go get -u github.com/writefreely/writefreely/cmd/writefreely to check is there any build error, the output is:

# github.com/writeas/activityserve
writeas/activityserve@v0.0.0-20200409150223-d7ab3eaa4481/actor.go:457:39: not enough arguments in call to httpsig.NewSigner
    have ([]httpsig.Algorithm, string, []string, httpsig.SignatureScheme)
    want ([]httpsig.Algorithm, httpsig.DigestAlgorithm, []string, httpsig.SignatureScheme, int64)
writeas/activityserve@v0.0.0-20200409150223-d7ab3eaa4481/actor.go:524:35: not enough arguments in call to httpsig.NewSigner
    have ([]httpsig.Algorithm, string, []string, httpsig.SignatureScheme)
    want ([]httpsig.Algorithm, httpsig.DigestAlgorithm, []string, httpsig.SignatureScheme, int64)
thebaer commented 3 years ago

So I wonder whther it needs a depoly sync in fact?

Yes, it looks like the docs on our site weren't syncing up. Should be fixed now :+1:

For the build error, that shouldn't come up if you have Go modules enabled (see writeas/activityserve#1). Can you try enabling Go modules and see if that fixes it?

ownia commented 3 years ago

For the build error, that shouldn't come up if you have Go modules enabled (see writeas/activityserve#1). Can you try enabling Go modules and see if that fixes it?

Thanks, with GO111MODULE="auto" I installed it successfully. And I think auto should be specified instead of on.

thebaer commented 3 years ago

Great! Yes, I think auto works best across all Go projects, but you should always be fine with on here. And I believe that's the default setting in recent versions of Go.

I'll go ahead and close this, since it looks like all the issues are resolved!