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

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

Diff LGTM, please resolve merge conflicts.

@doronbehar doronbehar requested a review from vcunat March 28, 2021 17:53
@vcunat
Copy link
Member

vcunat commented Mar 28, 2021

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

Copy link
Member

@vcunat vcunat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@vcunat
Copy link
Member

vcunat commented Mar 28, 2021

Thanks for mentioning me.

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

griff commented Mar 29, 2021

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

vcunat pushed a commit that referenced this pull request 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)
@leona-ya leona-ya mentioned this pull request Jan 3, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants