-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
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
stdenv: arithmetic fixes #130597
stdenv: arithmetic fixes #130597
Conversation
This whole set of changes needs to target |
@lovesegfault thank you for your feedback. |
pkgs/stdenv/generic/setup.sh
Outdated
@@ -395,7 +395,7 @@ findInputs() { | |||
local -i relHostOffset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You wanted this -i
removed, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, you're right, I forgot that one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just checked this again. I tried separating the PRs as much as possible and some of the other -i
are taken care of in another PR. I'm going to remove that one as well though.
The original intention was to make it easier to test. But since the hydra tests are so long, they have had to be grouped anyways. Now I realise it wasn't the best strategy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this declaration because you did update the variable's use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you're right on this one.
Well, for all intention-revealing, in my opinion And Have you checked any cross-compilation? (In the ideal world we would have a full-cross test where architecture A builds a cross-compiler from B to C, the it is run in Qemu-emulated B, then the output is checked on Qemu-emulated C; but I am not aware of such a test easily available; |
bf40c30
to
9746d10
Compare
I haven't checked cross compilation that is a good idea. |
Just talked to vladimir about running some cross tests. Hopefully I can do it in the next day or 2 |
Ok vladimir was nice enough to run cross compilation on a whole set of PRs |
Motivation for this change
This is a PR in the series of stdenv proposed shell fixes
This PR can be controversial.
This removes the -i flag that makes the shell parser dynamic. (the -i flag does not work with oil shell, but is not needed as well, the drawback is that the intent that the variable is an integer is less clear).
This also uses the
((...))
form for arithmetic computation.The original proposed commits are 59ec2c7
and e0b7c12
I omitted some changes in the original PR because I'm not 100% sure about those.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)