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

v0.6.0 depends on github.com/hashicorp/hcl/hcl/printer which doesn't exist anymore #64

Closed
mweinelt opened this issue Mar 12, 2021 · 7 comments

Comments

@mweinelt
Copy link
Contributor

github.com/fleaz/CptHook (download)
github.com/dustin/go-humanize (download)
github.com/sirupsen/logrus (download)
Fetching https://golang.org/x/sys/unix?go-get=1
Parsing meta tags from https://golang.org/x/sys/unix?go-get=1 (status code 200)
get "golang.org/x/sys/unix": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at https://golang.org/x/sys/unix?go-get=1
get "golang.org/x/sys/unix": verifying non-authoritative meta tag
Fetching https://golang.org/x/sys?go-get=1
Parsing meta tags from https://golang.org/x/sys?go-get=1 (status code 200)
golang.org/x/sys (download)
Fetching https://golang.org/x/sys/internal/unsafeheader?go-get=1
Parsing meta tags from https://golang.org/x/sys/internal/unsafeheader?go-get=1 (status code 200)
get "golang.org/x/sys/internal/unsafeheader": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at https://golang.org/x/sys/internal/unsafeheader?go-get=1
get "golang.org/x/sys/internal/unsafeheader": verifying non-authoritative meta tag
github.com/spf13/viper (download)
github.com/fsnotify/fsnotify (download)
github.com/hashicorp/hcl (download)
github.com/agext/levenshtein (download)
github.com/apparentlymart/go-textseg (download)
github.com/mitchellh/go-wordwrap (download)
github.com/zclconf/go-cty (download)
Fetching https://golang.org/x/text/unicode/norm?go-get=1
Parsing meta tags from https://golang.org/x/text/unicode/norm?go-get=1 (status code 200)
get "golang.org/x/text/unicode/norm": found meta tag get.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/unicode/norm?go-get=1
get "golang.org/x/text/unicode/norm": verifying non-authoritative meta tag
Fetching https://golang.org/x/text?go-get=1
Parsing meta tags from https://golang.org/x/text?go-get=1 (status code 200)
golang.org/x/text (download)
Fetching https://golang.org/x/text/transform?go-get=1
Parsing meta tags from https://golang.org/x/text/transform?go-get=1 (status code 200)
get "golang.org/x/text/transform": found meta tag get.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/transform?go-get=1
get "golang.org/x/text/transform": verifying non-authoritative meta tag
package github.com/hashicorp/hcl/hcl/printer: cannot find package "github.com/hashicorp/hcl/hcl/printer" in any of:
	/usr/lib/go-1.11/src/github.com/hashicorp/hcl/hcl/printer (from $GOROOT)
	/usr/local/go/src/github.com/hashicorp/hcl/hcl/printer (from $GOPATH)
github.com/magiconair/properties (download)
github.com/mitchellh/mapstructure (download)
github.com/pelletier/go-toml (download)
github.com/spf13/afero (download)
github.com/spf13/cast (download)
github.com/spf13/jwalterweatherman (download)
github.com/spf13/pflag (download)
github.com/subosito/gotenv (download)
Fetching https://gopkg.in/ini.v1?go-get=1
Parsing meta tags from https://gopkg.in/ini.v1?go-get=1 (status code 200)
get "gopkg.in/ini.v1": found meta tag get.metaImport{Prefix:"gopkg.in/ini.v1", VCS:"git", RepoRoot:"https://gopkg.in/ini.v1"} at https://gopkg.in/ini.v1?go-get=1
gopkg.in/ini.v1 (download)
Fetching https://gopkg.in/yaml.v2?go-get=1
Parsing meta tags from https://gopkg.in/yaml.v2?go-get=1 (status code 200)
get "gopkg.in/yaml.v2": found meta tag get.metaImport{Prefix:"gopkg.in/yaml.v2", VCS:"git", RepoRoot:"https://gopkg.in/yaml.v2"} at https://gopkg.in/yaml.v2?go-get=1
gopkg.in/yaml.v2 (download)
github.com/lrstanley/girc (download)
@fleaz
Copy link
Owner

fleaz commented Mar 12, 2021

Based on your error messages, it seems like you are using Go 1.16 in the legacy GOPATH mode rather than in the current Go Modules mode. Because GOPATH mode doesn't understand versioning, it's unable to distinguish between HCL version 1 and HCL version 2, and so it's failing to access what looks to be a HCL version 1 dependency.

Looks like you are hitting hashicorp/hcl#449

Using Go Modules for dependency resolution should fix this. That's probably also the reason why neither I nor Travis encountered this issue.

@mweinelt
Copy link
Contributor Author

Go 1.11 on Debian 10. Can go for 1.14 in backports and retry.

@fleaz
Copy link
Owner

fleaz commented Mar 12, 2021

1.11 is fine, because it already has support for go modules. You just need to set the GO111MODULE environment variable because it's not the default behaviour :)

@mweinelt
Copy link
Contributor Author

mweinelt commented Mar 12, 2021

go: cannot find main module; see 'go help modules'

with GO111MODULE set to on.

go get -v -u github.com/fleaz/CptHook

@mweinelt
Copy link
Contributor Author

mweinelt commented Mar 25, 2021

Using go1.14 from bpo I get the same hcl printer problem, even with GO114MODULE=on.

                  github.com/fleaz/CptHook (download)
                  github.com/dustin/go-humanize (download)
                  github.com/sirupsen/logrus (download)
                  get "golang.org/x/sys/unix": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at //golang.org/x/sys/unix?go-get=1
                  get "golang.org/x/sys/unix": verifying non-authoritative meta tag
                  golang.org/x/sys (download)
                  get "golang.org/x/sys/internal/unsafeheader": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at //golang.org/x/sys/internal/unsafeheader?go-get=1
                  get "golang.org/x/sys/internal/unsafeheader": verifying non-authoritative meta tag
                  github.com/spf13/viper (download)
                  github.com/fsnotify/fsnotify (download)
                  github.com/hashicorp/hcl (download)
                  github.com/agext/levenshtein (download)
                  github.com/apparentlymart/go-textseg (download)
                  github.com/mitchellh/go-wordwrap (download)
                  github.com/zclconf/go-cty (download)
                  get "golang.org/x/text/unicode/norm": found meta tag get.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at //golang.org/x/text/unicode/norm?go-get=1
                  get "golang.org/x/text/unicode/norm": verifying non-authoritative meta tag
                  golang.org/x/text (download)
                  get "golang.org/x/text/transform": found meta tag get.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at //golang.org/x/text/transform?go-get=1
                  get "golang.org/x/text/transform": verifying non-authoritative meta tag
                  package github.com/hashicorp/hcl/hcl/printer: cannot find package "github.com/hashicorp/hcl/hcl/printer" in any of:
                  	/usr/lib/go-1.14/src/github.com/hashicorp/hcl/hcl/printer (from $GOROOT)
                  	/usr/local/go/src/github.com/hashicorp/hcl/hcl/printer (from $GOPATH)
                  github.com/magiconair/properties (download)
                  github.com/mitchellh/mapstructure (download)
                  github.com/pelletier/go-toml (download)
                  github.com/spf13/afero (download)
                  github.com/spf13/cast (download)
                  github.com/spf13/jwalterweatherman (download)
                  github.com/spf13/pflag (download)
                  github.com/subosito/gotenv (download)
                  get "gopkg.in/ini.v1": found meta tag get.metaImport{Prefix:"gopkg.in/ini.v1", VCS:"git", RepoRoot:"https://gopkg.in/ini.v1"} at //gopkg.in/ini.v1?go-get=1
                  gopkg.in/ini.v1 (download)
                  get "gopkg.in/yaml.v2": found meta tag get.metaImport{Prefix:"gopkg.in/yaml.v2", VCS:"git", RepoRoot:"https://gopkg.in/yaml.v2"} at //gopkg.in/yaml.v2?go-get=1
                  gopkg.in/yaml.v2 (download)
                  github.com/lrstanley/girc (download)

@belzebub40k
Copy link

@mweinelt The variable is still called GO111MODULE in go-1.14. For me it is working with go-1.14 and GO111MODULE=on.

@mweinelt
Copy link
Contributor Author

Right, setting GO111Modules: on in YAML got me GO111MODULES=True, and go wasn't too happy about that.

Next up, I am now supposed to specify a GOCACHE path.

build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined

After that things are working.

Fuck YAML.

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

3 participants