-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 Lru type parameter requires go1.18 or later #2576
Comments
I suspect you need a As of the Go 1.17 release, if the go directive is missing, go 1.16 is assumed |
I cannot otherwise reproduce this problem on darwin/amd64 with Go 1.20.1, so I'm going to close this issue for now. |
I am still seeing this issue. Testing with 1.18.10, 1.19.7 and 1.20.2. I can also confirm that after removing #2570 it works with all 3. |
@cdavis09 I suspect your problem is caused by you running
This would most likely solve what I imagine your problem is. If not, Can you provide a repository that demonstrates this issue? I am not able to reproduce it. |
Hi @StevenACoffman, I did exactly as you suggested above. I initialized a clean project (e.g. The only way to get it to run was by pulling a local copy of Note that I tried it 2 ways once I established that it worked. I completely initialized a project using latest |
Hey, thanks very much for doing all that and clarifying, and I'm really sorry for this. I have to admit I'm somewhat stymied by not being able to reproduce this problem locally. Thanks for continuing to stick with it. When you initialized a clean project with Can you also tell me what the output of |
The Since I am primarily concerned with using go
Hope this helps! |
i have met same error, I happened to fix it. I use vscode, I open project A in vscode, at the same time, I open terminal, enter project B, run go run ./server.go, expecting project B would work. but not, it give me above error. and then, In vscode I close project A, and open Project B, run same commands, it works. it's so werid |
I wanted to update that this is still an issue, at least when following the directions directly. After looking into it a little more (there's still some things going on I haven't had time to track down) I found a simple workaround. With all of the above reported environment and versions the same, I can reproduce the failure 100% of the time. I looked into the cache and path resolution for the dependency on But, if after running
As you can see, it moved And glancing at the binary (using
I don't know why this wasn't necessary before or why it's not necessary when you (@StevenACoffman) run the instructions in the |
Oh wow. Ok, thanks. So gqlgen generate currently runs Go mod tidy here: Line 100 in 1c6bf9b
Is it possible the config file sets |
Hi Steven, no the config file does not set that value. I have been using the default file generated from the |
Added `go mod tidy` in quick start guide to address issues like 99designs#2717, 99designs#2651, 99designs#2641, 99designs#2614 and 99designs#2576
Added `go mod tidy` in quick start guide to address issues like 99designs#2717, 99designs#2651, 99designs#2641, 99designs#2614 and 99designs#2576
Added `go mod tidy` in quick start guide to address issues like 99designs#2717, 99designs#2651, 99designs#2641, 99designs#2614 and 99designs#2576
What happened?
Hi, i just tried installing the library and after running
go run ./server.go
im getting the following errors../pkg/mod/github.com/hashicorp/golang-lru/[email protected]/simplelru/list.go:8:12: type parameter requires go1.18 or later (-lang was set to go1.16; check go.mod)
../pkg/mod/github.com/hashicorp/golang-lru/[email protected]/simplelru/list.go:8:14: predeclared comparable requires go1.18 or later (-lang was set to go1.16; check go.mod)
../pkg/mod/github.com/hashicorp/golang-lru/[email protected]/simplelru/list.go:8:28: predeclared any requires go1.18 or later (-lang was set to go1.16; check go.mod)
../pkg/mod/github.com/hashicorp/golang-lru/[email protected]/simplelru/list.go:14:19: type instantiation requires go1.18 or later (-lang was set to go1.16; check go.mod)
and so on, until im getting the too many errors message
I got it to work by reversing #2570 update though
versions
v0.17.25
?go version go1.20.1 darwin/amd64
?The text was updated successfully, but these errors were encountered: