expr-lang/expr

Overflow errors when building for `386`

Closed this issue · 2 comments

When trying to build our project with the current master branch (for the fix of #652), we're seeing the following errors:

GOARCH=386 GOOS=linux go build

# github.com/expr-lang/expr/compiler
../../../go/pkg/mod/github.com/expr-lang/expr@v1.16.8-0.20240517174020-eb70f943cc3d/compiler/compiler.go:348:19: math.MaxInt64 (untyped int constant 9223372036854775807) overflows int
../../../go/pkg/mod/github.com/expr-lang/expr@v1.16.8-0.20240517174020-eb70f943cc3d/compiler/compiler.go:348:49: math.MinInt64 (untyped int constant -9223372036854775808) overflows int
../../../go/pkg/mod/github.com/expr-lang/expr@v1.16.8-0.20240517174020-eb70f943cc3d/compiler/compiler.go:368:19: math.MaxUint32 (untyped int constant 4294967295) overflows int

Fixed. This was caused by my other fix.

I also added a workflow which going to text build on GOARCH=386 in CI: https://github.com/expr-lang/expr/blob/master/.github/workflows/build.yml

Awesome, can confirm the fix works.