-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
lib: introduce imap0, imap1 #25543
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
lib: introduce imap0, imap1 #25543
Conversation
For historical reasons, imap starts counting at 1 and it's not consistent with the rest of the lib. So for now we split imap into imap0 that starts counting at zero and imap1 that starts counting at 1. And imap is marked as deprecated. See NixOS@c71e2d4#commitcomment-21873221
@zimbatm, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @Profpatsch and @nbp to be potential reviewers. |
If I get 👍 for this PR I will also start replacing all the |
I thought about maybe having |
In lib/strings.nix we also have concatImapStrings and concatImapStringsSep that start counting at 1 |
After replacing all the lib.imap calls there is only one instance where imap0 was used. |
lib/lists.nix
Outdated
But for consistency with the rest of the library we want an index | ||
starting at zero. | ||
*/ | ||
imap = imap1; |
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.
nit: move it to lib/deprecated.nix
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.
fixed in 54a81c8
Please fix pkgs/stdenv/booter.nix: |
@mguentner @zimbatm I fixed booter.nix in d788244 since I was just building something off master and got lots of |
Fix the usage of imap as a follow-up to #25543
thanks @NeQuissimus |
Motivation for this change
For historical reasons, imap starts counting at 1 and it's not
consistent with the rest of the lib.
So for now we split imap into imap0 that starts counting at zero and
imap1 that starts counting at 1. And imap is marked as deprecated.
See c71e2d4#commitcomment-21873221
Also:
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)