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

[go1.20] "cannot convert PadTo(x, 64) (value of type []byte) to type [64]byte" #12042

Closed
gg718 opened this issue Feb 23, 2023 · 1 comment
Closed

Comments

@gg718
Copy link

gg718 commented Feb 23, 2023

I have github.com/prysmaticlabs/prysm/[email protected] added as a dependency in my go.mod, and I'm trying to upgrade my project from go1.19 to go1.20 and am getting the following error:

# github.com/prysmaticlabs/prysm/v3/encoding/bytesutil
/go/pkg/mod/github.com/prysmaticlabs/prysm/[email protected]/encoding/bytesutil/bytes_go120.go:12:17: cannot convert PadTo(x, 4) (value of type []byte) to type [4]byte: conversion of slices to arrays requires go1.20 or later (-lang was set to go1.19; check go.mod)
/go/pkg/mod/github.com/prysmaticlabs/prysm/[email protected]/encoding/bytesutil/bytes_go120.go:19:18: cannot convert PadTo(x, 20) (value of type []byte) to type [20]byte: conversion of slices to arrays requires go1.20 or later (-lang was set to go1.19; check go.mod)
/go/pkg/mod/github.com/prysmaticlabs/prysm/[email protected]/encoding/bytesutil/bytes_go120.go:26:18: cannot convert PadTo(x, 32) (value of type []byte) to type [32]byte: conversion of slices to arrays requires go1.20 or later (-lang was set to go1.19; check go.mod)
/go/pkg/mod/github.com/prysmaticlabs/prysm/[email protected]/encoding/bytesutil/bytes_go120.go:33:18: cannot convert PadTo(x, 48) (value of type []byte) to type [48]byte: conversion of slices to arrays requires go1.20 or later (-lang was set to go1.19; check go.mod)
/go/pkg/mod/github.com/prysmaticlabs/prysm/[email protected]/encoding/bytesutil/bytes_go120.go:40:18: cannot convert PadTo(x, 64) (value of type []byte) to type [64]byte: conversion of slices to arrays requires go1.20 or later (-lang was set to go1.19; check go.mod)
/go/pkg/mod/github.com/prysmaticlabs/prysm/[email protected]/encoding/bytesutil/bytes_go120.go:47:18: cannot convert PadTo(x, 96) (value of type []byte) to type [96]byte: conversion of slices to arrays requires go1.20 or later (-lang was set to go1.19; check go.mod)

bytes_go120.go seems to be ready for go1.20 (PR #11838 by @prestonvanloon) but the go.mod still references go1.19, which is causing compilation issues for projects using go1.20+.

@prestonvanloon
Copy link
Member

@gg718 There may be several requirements to update prysm to 1.20. Let's close this in favor of #12043 which is a broader support issue for go1.20.

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