boyter / scc

Sloc, Cloc and Code: scc is a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go
MIT License
6.28k stars 250 forks source link

scc version 3.2.0 fails to compile with 32 bit golang toolchain in Windows #416

Closed Biswa96 closed 7 months ago

Biswa96 commented 7 months ago

Describe the bug

scc version 3.2.0 fails to compile with 32 bit golang toolchain in Windows.

To Reproduce

Compile the scc version 3.2.0 using the commands from here https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-scc/PKGBUILD

It fails with the following error.

cmd\badges\simplecache.go:90:21: cannot use math.MaxInt64 (untyped int constant 9223372036854775807) as int value in assignment (overflows)

Expected behavior

The build should not fail.

Desktop (please complete the following information):

boyter commented 7 months ago

That's unexpected.

In this case its building the badges that's causing the issue, which technically you don't need for scc.

I have pushed a fix into master which should resolve this. If you are able to confirm ill craft a new point release to ensure you can use that.

Biswa96 commented 7 months ago

Thank your for quick response. I have verified that e1519e0a9feb11b92012f29736a7feb81ea066f5 commit fixes the build failure with 32 bit golang toolchain. From the perspective of MSYS2 project, it is not necessary to create a new release.

boyter commented 7 months ago

Neat. Ill close this out then. Sorry about that.