Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation instructions outdated #155

Open
th0rgall opened this issue Oct 20, 2021 · 1 comment
Open

Compilation instructions outdated #155

th0rgall opened this issue Oct 20, 2021 · 1 comment

Comments

@th0rgall
Copy link

th0rgall commented Oct 20, 2021

There are a few issues in the instructions.

Context:

  • as instructed, I installed go and set the GOPATH variable. I then followed the rest of the steps.
  • go version go1.17.2 darwin/amd64, which is the one downloadable from the Go site at the time of writing.

1st issue: deprecation warning when installing esc using the latest go

mailslurper % go get github.com/mjibson/esc
go: downloading github.com/mjibson/esc v0.2.0
go: downloading github.com/pkg/errors v0.9.1
go: downloading golang.org/x/tools v0.0.0-20190608022120-eacb66d2a7c3
go get: installing executables with 'go get' in module mode is deprecated.
	To adjust and download dependencies of the current module, use 'go get -d'.
	To install using requirements of the current module, use 'go install'.
	To install ignoring the current module, use 'go install' with a version,
	like 'go install example.com/cmd@latest'.
	For more information, see https://golang.org/doc/go-get-install-deprecation
	or run 'go help get' or 'go help install'.
go get: added github.com/mjibson/esc v0.2.0

The esc repo now mentions the command go get -u github.com/mjibson/esc as installation instruction, that that one also generates a deprecation warning.

2nd issue: mention that $GOPATH/bin should be added to the $PATH

Otherwise, this happens when running go generate:

mailslurper % go generate
mailslurper.go:5: running "esc": exec: "esc": executable file not found in $PATH
mailslurper % ls

3rd issue: not all Go versions >= Go 1.10 are supported

As mentioned, started with the default version go version go1.17.2 darwin/amd64
This resulted in a long sigpanic error, I think originating from esc

thor@Thors-MBP go % mailslurper
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff20409c9e]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff20409c9e
[ many lines omitted]

Version 1.10.7 gave another issue:

mailslurper % go1.10.7 get
package github.com/labstack/echo/v4/middleware: cannot find package "github.com/labstack/echo/v4/middleware" in any of:
	/Users/thor/sdk/go1.10.7/src/github.com/labstack/echo/v4/middleware (from $GOROOT)
	/Users/thor/Code/go/src/github.com/labstack/echo/v4/middleware (from $GOPATH)
mailslurper % go1.10.7 generate
mailslurper % go1.10.7 build

Version 1.11 too:

thor@Thors-MBP mailslurper % go1.11 get
go: finding github.com/labstack/echo v3.3.10+incompatible
go build github.com/mailslurper/mailslurper/pkg/auth/authscheme: module requires Go 1.13
go build github.com/mattn/go-isatty: module requires Go 1.12
go build github.com/labstack/gommon/bytes: module requires Go 1.12
go build github.com/labstack/gommon/random: module requires Go 1.12
go build github.com/mailslurper/mailslurper/pkg/auth/auth: module requires Go 1.13
go build golang.org/x/sys/unix: module requires Go 1.12
go build github.com/mailslurper/mailslurper/pkg/cache: module requires Go 1.13
go build github.com/mailslurper/mailslurper/cmd/mailslurper/www: module requires Go 1.13

Finally, I could get all get, generate and build steps working with version 1.13!

go install golang.org/dl/go1.13@latest
go1.13 download
cd mailslurper/cmd/mailslurper
go1.13 get
go1.13 generate
go1.13 build

4th issue: mention how to run this

$ mailslurper

All this may be obvious to people with Go experience, but not to people like me who only installed Go to get started with MailSlurper.

@gaeljw
Copy link

gaeljw commented May 3, 2022

Same here :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants