Description
nixfmt formats 3000000000 into -1294967296 on armv7 (a 32 bit platform)
Steps to reproduce
$ echo '3000000000' | /nix/store/g5sxhbx8c0h585rnyacf3caa1k9pzq3n-nixfmt-unstable-2024-08-08/bin/nixfmt
-1294967296
3000000000 is a 32 bit unsigned integer with the first bit set: reinterpreted as a signed 32 bit integer it becomes -1294967296
Context:
32bit nix handles these numbers fine:
$ nix repl
Welcome to Nix 2.18.5. Type :? for help.
nix-repl> 3000000000
3000000000
nixfmt does not have this issue on x86_64 (and presumably on all 64bit platforms)
Description
nixfmt formats 3000000000 into -1294967296 on armv7 (a 32 bit platform)
Steps to reproduce
3000000000 is a 32 bit unsigned integer with the first bit set: reinterpreted as a signed 32 bit integer it becomes -1294967296
Context:
32bit nix handles these numbers fine:
nixfmt does not have this issue on x86_64 (and presumably on all 64bit platforms)