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

undefined: os.UserHomeDir #278

Closed
AddictArts opened this issue Feb 11, 2020 · 6 comments
Closed

undefined: os.UserHomeDir #278

AddictArts opened this issue Feb 11, 2020 · 6 comments

Comments

@AddictArts
Copy link

When running

go get github.com/wagoodman/dive

Needs Go 1.12? Readme says 1.9+. Or is this another issue.

@abitrolly
Copy link
Contributor

@AddictArts I don't see the reference to os.UserHomeDir in this repository - https://github.com/wagoodman/dive/search?utf8=%E2%9C%93&q=UserHomeDir&type= Can you post the full build log?

@AddictArts
Copy link
Author

I don't have it anymore. I ended up upgrading to go 1.14 and that solved the issue.

@abitrolly
Copy link
Contributor

@AddictArts if you can test the build with lower go versions doesn't work, then we can update the Readme with lowest supported version. Installing different go is easy with snap.

sudo snap install go --channel 1.13/stable --classic

@AddictArts
Copy link
Author

Thanks @abitrolly, I have built it on Windows and Mac OS, but not Ubuntu / Linux. So, I could down grade from 1.14 on Mac OS, but doesn't seem worth it for me. I believe the issue occurred on Windows and then I upgraded go versions. I suspect your minimal version is 1.12, but I can't verify that. Cheers

@abitrolly
Copy link
Contributor

I could build dive with GO111MODULE set with go as low as 1.10, and with 1.9 the error was about undefined: strings.Builder which was added in 1.10 https://www.calhoun.io/concatenating-and-building-strings-in-go/

✗ sudo snap refresh go --channel 1.10/stable --classic
go (1.10/stable) 1.10.8 from Michael Hudson-Doyle (mwhudson) refreshed
✗ GO111MODULE=auto go build -o dive10
✗ sudo snap refresh go --channel 1.9/stable --classic
go (1.9/stable) 1.9.7 from Michael Hudson-Doyle (mwhudson) refreshed
✗ go version                                         
go version go1.9.7 linux/amd64
✗ GO111MODULE=auto go build -o dive9                 
# github.com/wagoodman/dive/runtime/ci
runtime/ci/evaluator.go:137:9: undefined: strings.Builder

My minimal version is 1.10.

abitrolly added a commit to abitrolly/dive that referenced this issue Mar 23, 2020
@AddictArts
Copy link
Author

That seems very reasonable, thanks again.

wagoodman added a commit that referenced this issue May 13, 2020
Require golang 1.10+ (closes #278)
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