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

Document minimum (or maximum) supported toolchain requirements #147

Open
2 tasks
connorkuehl opened this issue Apr 5, 2022 · 0 comments
Open
2 tasks

Document minimum (or maximum) supported toolchain requirements #147

connorkuehl opened this issue Apr 5, 2022 · 0 comments

Comments

@connorkuehl
Copy link
Contributor

connorkuehl commented Apr 5, 2022

Newer versions of goyacc try to optimize the representation of certain things. If using the latest goyacc, one of the generated files will be updated to use thinner ints which breaks the build like so:

diff --git a/internal/lvgen/y.go b/internal/lvgen/y.go
index 1ea031b..389c36a 100644
--- a/internal/lvgen/y.go
    b/internal/lvgen/y.go
@@ -118,7  118,7 @@ const yyInitialStackSize = 16
 //line sunrpc.y:279
 
 //line yacctab:1
-var yyExca = [...]int{
 var yyExca = [...]int8{
        -1, 1,
        1, -1,
        -2, 0,
@@ -128,7  128,7 @@ const yyPrivate = 57344
$ go generate ./...
  processing libvirt.yml done.
# github.com/digitalocean/go-libvirt/internal/lvgen
./lvlexer.go:75:12: cannot use yyTok2[tokType - yyPrivate] (type int8) as type int in assignment
internal/lvgen/lv-gen.go:29: running "go": exit status 2

For now, I've installed goyacc@c6776771dde7a49828feb54fd8be11695a32b558 for local development.

goyacc seems to perform this optimization since commit 59f1f2c5a8fd844a6cc55e9a773a7003bd8e5480.


edit: the following components could be addressed:

  • goyacc
  • go/go-get/go-install (the CI seems to be pinned to 1.16.2 and uses go-get, as does ./scripts/gen-consts.sh; go-get is deprecated in Go 1.17)
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

1 participant