Skip to content
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

nixos/kresd: Fix unsupported regex #100592

Merged
merged 1 commit into from Mar 28, 2021
Merged

nixos/kresd: Fix unsupported regex #100592

merged 1 commit into from Mar 28, 2021

Conversation

@griff
Copy link
Contributor

@griff griff commented Oct 15, 2020

Regex supported by builtins.match differ on Linux and Darwin
(see NixOS/nix#1537) and the empty match group errors on Darwin.
But simply removing it does not change the logic in the module in any
way.

Motivation for this change

The kresd module can't at the moment be evaluated on Darwin due to NixOS/nix#1537 since empty match groups aren't supported there.

Things done

Simply removed empty match group since all the rest of the logic works exactly the same with or without it.

  • 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Regex supported by `builtins.match` differ on Linux and Darwin
(see NixOS/nix#1537) and the empty match group errors on Darwin.
But simply removing it does not change the logic in the module in any
way.
@doronbehar
Copy link
Contributor

@doronbehar doronbehar commented Mar 28, 2021

Diff LGTM, please resolve merge conflicts.

@doronbehar doronbehar requested a review from vcunat Mar 28, 2021
@vcunat
Copy link
Member

@vcunat vcunat commented Mar 28, 2021

BTW, you don't actually use NixOS modules on darwin, right? (just eval for *-linux)

vcunat
vcunat approved these changes Mar 28, 2021
Copy link
Member

@vcunat vcunat left a comment

Looks good to me. I don't have any darwin at hand; I'll trust you on that.

@vcunat
Copy link
Member

@vcunat vcunat commented Mar 28, 2021

Thanks for mentioning me.

@vcunat vcunat merged commit 0032a3f into NixOS:master Mar 28, 2021
16 checks passed
@griff griff deleted the inconsistent-regex branch Mar 29, 2021
@griff
Copy link
Contributor Author

@griff griff commented Mar 29, 2021

@vcunat yes I just eval for *-linux and then have a VM that is a remote builder.

vcunat added a commit that referenced this issue Apr 1, 2021
Regex supported by `builtins.match` differ on Linux and Darwin
(see NixOS/nix#1537) and the empty match group errors on Darwin.
But simply removing it does not change the logic in the module in any
way.

(cherry picked from commit ab94ea6, PR #100592)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants