-
Notifications
You must be signed in to change notification settings - Fork 83
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
With go1.18rc1 getting error: constraints: package constraints is not in GOROOT #13
Comments
Try changing |
I'm seeing the problem using Installer:
Based on the draft release notes, it looks like |
Unfortunately, adding Looks like it's deliberately unsupported: golang/go#35283 |
Right now I'm using go1.18beta2. Once installed run the following commands to produce a Go 1.18 program that uses # create a new directory
mkdir helloworld
cd helloworld
# write a Go program "main.go"
cat > main.go << EOF
package main
import "github.com/tidwall/btree"
func main() {
var m btree.Map[string, string]
m.Set("hello", "world")
println(m.Get("hello"))
}
EOF
# add the Go module dependencies
go1.18beta2 mod init helloworld
go1.18beta2 get github.com/tidwall/btree@generics
go1.18beta2 mod tidy
# run the file program
go1.18beta2 run main.go
output:
|
The "constraints" package is built into 1.18. |
The problem is with |
My bad, my brain was registering I pushed a fix moments ago. Thanks. |
works now. |
Now that Go 1.18 is officially released 🎉 I'm gonna close this issue. Thanks! |
go get github.com/tidwall/btree@generics
go: downloading github.com/tidwall/btree v1.1.1-0.20220103194347-7411d3930522
github.com/tidwall/btree imports
constraints: package constraints is not in GOROOT (/Users//sdk/go1.18rc1/src/constraints)
The text was updated successfully, but these errors were encountered: