Code Monkey home page Code Monkey logo

Comments (9)

ohler55 avatar ohler55 commented on June 14, 2024 1

Thanks for the find. I would not have expected that since the documentation makes no mention of the restriction. I'll take a look at what the best work around is.

from ojg.

ohler55 avatar ohler55 commented on June 14, 2024 1

Please try the "32-bit" branch.

from ojg.

FZambia avatar FZambia commented on June 14, 2024 1

Yes, 32-bit branch seems fine, thanks!

from ojg.

FZambia avatar FZambia commented on June 14, 2024

Yep, agree – this is not obvious at all. One important thing I just realized is that math.MaxInt was only added in Go 1.17, so relying on it will make it impossible to build ojg on Go < 1.17.

from ojg.

ohler55 avatar ohler55 commented on June 14, 2024

The MaxInt64 is meant to be the limit on and array length for filters. I suspect no one could reasonably complain about a maximum of 21474836487.

from ojg.

ohler55 avatar ohler55 commented on June 14, 2024

The develop branch has what I hope is a fix.

from ojg.

ohler55 avatar ohler55 commented on June 14, 2024

v1.12.6 released with the fix.

from ojg.

FZambia avatar FZambia commented on June 14, 2024

@ohler55 thanks!

Just checked it out: 21474836487 is still larger than 2147483647 which is a maximum value for int32, so there are still errors:

❯ GOOS=linux GOARCH=arm go build
# github.com/ohler55/ojg/jp
../../jp/get.go:420:8: constant 21474836487 overflows int
../../jp/get.go:981:8: constant 21474836487 overflows int
../../jp/node.go:262:8: constant 21474836487 overflows int
../../jp/node.go:537:8: constant 21474836487 overflows int
../../jp/parse.go:355:13: constant 21474836487 overflows int
../../jp/parse.go:362:13: constant 21474836487 overflows int
../../jp/slice.go:27:10: constant 21474836487 overflows int

Looks like a typo in a number - maybe using math.MaxInt32 will be better here?

from ojg.

ohler55 avatar ohler55 commented on June 14, 2024

Typo, darn. I'll try again.

from ojg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.