-
Notifications
You must be signed in to change notification settings - Fork 18k
go mod doesn't work for github.com/gomarkdown/markdown/html #27565
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
Comments
@kjk I just looked into this, I was able to get your example working. I had to make a tiny modification as > git clone "https://github.com/kjk/modtest.git"
> cd modtest
> go mod init # To create a blank go.mod
> go mod tidy # To fill in the contents of go.mod
> go build
> ./modtest
Hello |
Full output:
|
@josephlr I fixed the compilation error in the code. However, I believe you did this inside GOPATH (as indicated by As I've indicated, you have to checkout the code outside of GOPATH. Try repro steps after e.g. |
@kjk Nope this was done outside of my |
Just tried this on |
@josephlr Are you using go 1.11 or master? Did you set I just double-checked and am still getting an error:
|
Also, what does
|
And just to be sure, do It works with
|
@kjk Still no luck reproducing your bug on I'm outside of GOPATH, no Go environment variables set (except GOPATH), using go 1.11 installed from Homebrew latest. I even went an manually deleted the entire package cache. Here's my full output:
Other versions of software that could help:
|
@josephlr Interesting. I tried to reproduce on another mac machine and couldn't. So it's something specific to a setup on one machine but I have no ideas on how to investigate this further. They both have similar setup, all programs from homebrew, kept up-to-date. |
@kjk please can you try the following:
|
That works, but I already said it works inside GOPATH.
|
But this test was outside of This therefore sounds like an issue with your build/module cache (most likely the latter). Perhaps take a backup of |
I'm not able to reproduce the failure either. I'm curious what happens if you run:
|
So the cache was busted to the point of messing things up. Knowing what I know now, most likely Unfortunately by removing the cache I also lost all the info needed to investigate it. A hint from earlier debug tries:
Also the error message is truncated or just badly phrased. Some other thoughts.
|
Yeah,
That could certainly do it. |
What version of Go are you using (
go version
)?$ go version
go version go1.11 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?OS X 10.13.6
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/kjk/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/kjk/src/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.11/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.11/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
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 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/2k/p2_4052s70vd5_cfdm0k0l740000gn/T/go-build479826685=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
git clone https://github.com/kjk/modtest.git
cd modtest
go mod init github.com/kjk/modtest
go build
What did you expect to see?
This should build.
What did you see instead?
For some reason
go mod
has issue withgithub.com/gomarkdown/markdown/html
even though it works forgithub.com/gomarkdown/markdown
andgithub.com/gomarkdown/markdown/ast
.The source of the problem seems to be:
There is no problem when running same
go get
when inGOPATH
.The text was updated successfully, but these errors were encountered: