We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixfmt formats 3000000000 into -1294967296 on armv7 (a 32 bit platform)
$ 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
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)
The text was updated successfully, but these errors were encountered:
Damn, good catch, made a PR, please try it out: #262
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
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)
The text was updated successfully, but these errors were encountered: