GithubHelp home page GithubHelp logo

Builds fails on 32 bit systems about minify HOT 9 CLOSED

misthios avatar misthios commented on August 31, 2024
Builds fails on 32 bit systems

from minify.

Comments (9)

tdewolff avatar tdewolff commented on August 31, 2024

Thanks for the heads up! I believe we can just convert the 32 to 31, it's an upper limit on how long a slice can be (which is actually 1<<31 for 32 bit systems since Len() returns an int).

from minify.

tdewolff avatar tdewolff commented on August 31, 2024

Can you try v2.20.29 and tell me if it works?

from minify.

misthios avatar misthios commented on August 31, 2024

Hello,

the new versions gives the same error type but different value

# github.com/tdewolff/minify/v2/bindings/py
bindings/py/minify.go:28:12: invalid array length 1 << 31 (untyped int constant 2147483648)
bindings/py/minify.go:37:12: invalid array length 1 << 31 (untyped int constant 2147483648)
# github.com/tdewolff/minify/v2/bindings/js
bindings/js/minify.go:28:12: invalid array length 1 << 31 (untyped int constant 2147483648)
bindings/js/minify.go:37:12: invalid array length 1 << 31 (untyped int constant 2147483648)

from minify.

tdewolff avatar tdewolff commented on August 31, 2024

Off-by-one error, please check v2.20.30!

from minify.

misthios avatar misthios commented on August 31, 2024

Hello,

the 32bit build is unfortunately still broken.

  1. the 2.20.30 commit only fixes one instance of the previous problem:
the goStringArray has the new -1, the goBytes still has 31 
  1. after patching 1 we get a new problem which can be seen in the screenshot below (i only patched the python bindings for problem 1).

image

from minify.

tdewolff avatar tdewolff commented on August 31, 2024

Must have been late, how does v2.20.31 do?

from minify.

misthios avatar misthios commented on August 31, 2024

Hello,

I still get the same result unfortunately:
image

from minify.

tdewolff avatar tdewolff commented on August 31, 2024

I really hope this is now fixed in v2.20.32, I have no idea why the address space for 32-bit systems is not math.MaxInt32-1 == 1<<31 - 1...

from minify.

misthios avatar misthios commented on August 31, 2024

Hello,

2.20.32 seems to be working

Thank you :)

from minify.

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.