Skip to content

stdenv: replace string expasion with array element check#130621

Closed
happysalada wants to merge 1 commit intoNixOS:stagingfrom
happysalada:stdenv_replace_string_match_with_array_check
Closed

stdenv: replace string expasion with array element check#130621
happysalada wants to merge 1 commit intoNixOS:stagingfrom
happysalada:stdenv_replace_string_match_with_array_check

Conversation

@happysalada
Copy link
Copy Markdown
Contributor

@happysalada happysalada commented Jul 19, 2021

Motivation for this change

This commit removes a string expansion to check array inclusion in favor of an array traversal.
It uses a named reference since that is perceived to be the code's intent.
(this removes an eval as a positive side effect).

Note that this change comes from a problematic commit and it was proposed in a previous PR.

@aszlig thank you for reviewing this the first time!
I believe that even though the resulting code is slightly different, the semantic meaning should be preserved. I do want to try a hydra test to make sure of my hypothesis.

https://github.com/NixOS/nixpkgs/pull/129903/files

The original commit with some comments bf99a81

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Relase notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@happysalada happysalada mentioned this pull request Jul 19, 2021
11 tasks
@github-actions github-actions bot added the 6.topic: stdenv Standard environment label Jul 19, 2021
@ofborg ofborg bot added 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Jul 19, 2021
@happysalada happysalada changed the base branch from master to staging July 23, 2021 12:48
@stale
Copy link
Copy Markdown

stale bot commented Apr 19, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 19, 2022
@happysalada happysalada deleted the stdenv_replace_string_match_with_array_check branch April 28, 2023 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: stdenv Standard environment 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant