Skip to content

Document minimum (or maximum) supported toolchain requirements #147

@connorkuehl

Description

@connorkuehl

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions