-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
golang linter install failing during docker image build #28291
Comments
That method was added in 1.9: https://golang.org/pkg/go/types/#TypeName.IsAlias Are you positive you're building on 1.11? |
Having the same problem with golang 1.8. What is your solution to this issue? |
You can check the PR
golang/tools#52
for the solution.
…On Tue, Oct 23, 2018, 8:01 AM Tianyi Chen ***@***.***> wrote:
Having the same problem with golang 1.8. What is your solution to this
issue?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#28291 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ANfqBShoaEQh_mB9WKaCOFQQNCd6iTzbks5unn-ZgaJpZM4Xx0-C>
.
|
I would request you to upgrade to 1.11. We do not support more than 2 releases behind. So the <1.9 kludge may be removed at some point. |
I'm confused by this issue - it started mentioning Go 1.11, and now concerns Go 1.8. Please see the documentation, which clearly shows that the last two Go releases are supported: https://github.com/golang/go/wiki/SubRepositories |
I'm having this issue with go1.8, how would we |
The subrepositories, including This issue is just going in circles, so I'm going to close it for now. Feel free to open another issue to propose changing the two-version policy. /cc @griesemer @alandonovan |
@mvdan what would be the best place to start a discussion about this? from my naive point of view it seems like it shouldn't be this hard to keep using a compatible version of golint in older go versions, but my background is in programming languages with package managers / repositories that take care of this (nodejs, php, python and the like) |
On newer Go versions, you would use Go modules to use a specific version of all dependencies, including the x/tools repository. On older Go versions, you can achieve the same with third party dependency management tools like dep or govendor, which can set up vendor directories. |
This commit fixes the following: 1. Docker has forbidden the older download url so `make` is failing 2. `go get golang.org/x/lint/golint` command fails while running `make` error ``` golang.org/x/tools/go/internal/gcimporter /go/src/golang.org/x/tools/go/internal/gcimporter/bexport.go:212: obj.IsAlias undefined (type *types.TypeName has no field or method IsAlias) ``` Ref: golang/go#28291 So this commit update the url to download docker and dependencies required to run docker (1). It also update the go version which is used to build the binary (2). Signed-off-by: Utkarsh Mani Tripathi <[email protected]>
This commit fixes the following: 1. Docker has forbidden the older download url so `make` is failing 2. `go get golang.org/x/lint/golint` command fails while running `make` error ``` golang.org/x/tools/go/internal/gcimporter /go/src/golang.org/x/tools/go/internal/gcimporter/bexport.go:212: obj.IsAlias undefined (type *types.TypeName has no field or method IsAlias) ``` Ref: golang/go#28291 So this commit update the url to download docker and dependencies required to run docker (1). It also update the go version which is used to build the binary (2). Signed-off-by: Utkarsh Mani Tripathi <[email protected]>
golint no longer supports 1.7. (golang/go#28291). It's time to update.
golint no longer supports 1.7. (golang/go#28291). It's time to update. (1.12 doesn't seem to work yet)
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.11
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
What did you do?
In a dockerfile, the following command fails during the docker image build
go get golang.org/x/lint/golint
Error
# golang.org/x/tools/go/internal/gcimporter /go/src/golang.org/x/tools/go/internal/gcimporter/bexport.go:212: obj.IsAlias undefined (type *types.TypeName has no field or method IsAlias)
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
Successful docker image build.
What did you see instead?
Error with exit status 2 for the failed installation of golang linter with the following error
The text was updated successfully, but these errors were encountered: