diff options
| author | Silvan Mosberger <silvan.mosberger@tweag.io> | 2024-02-27 23:26:40 +0100 |
|---|---|---|
| committer | Silvan Mosberger <silvan.mosberger@tweag.io> | 2024-02-27 23:26:40 +0100 |
| commit | 34295941145b2df1b6c3a9b36c50ad2982227b2f (patch) | |
| tree | cc9a7caca26235c7e5a4f8b607e6ced5bd6d510a /pkgs/development/python-modules/python-openstackclient/git@git.tavy.me:nixos | |
| parent | e7a4ed12aaff051818f1fc70ef19a306a46b504b (diff) | |
lib.fileset: Fix tests on Darwin, more POSIX
This was found when trying to run the fileset tests on Darwin
(https://github.com/NixOS/nix/pull/9546#issuecomment-1967409445), which mysteriously fail on Darwin:
test case at lib/fileset/tests.sh:342 failed: toSource { root = "/nix/store/foobar"; fileset = ./.; } should have errored with this regex pattern:
lib.fileset.toSource: `root` \(/nix/store/foobar\) is a string-like value, but it should be a path instead.
\s*Paths in strings are not supported by `lib.fileset`, use `lib.sources` or derivations instead.
but this was the actual error:
error: lib.fileset.toSource: `root` (/nix/store/foobar) is a string-like value, but it should be a path instead.
Paths in strings are not supported by `lib.fileset`, use `lib.sources` or derivations instead.
After dissecting this, I find out that apparently \s works on Linux, but not on Darwin for some reason!
From the bash source code, it looks like <regex.h> with `REG_EXTENDED` is used for all platforms the same,
so there's nothing odd there.
It's almost impossible to know where <regex.h> comes from,
but it looks to be a POSIX thing.
So after digging through the almost impossible to find POSIX specifications
(https://pubs.opengroup.org/onlinepubs/007908799/xbd/re.html#tag_007_003_005),
I can indeed confirm that there's no mention of \s or the like!
_However_, there is a mention of `[[:blank:]]`, so we'll use that instead.
Diffstat (limited to 'pkgs/development/python-modules/python-openstackclient/git@git.tavy.me:nixos')
0 files changed, 0 insertions, 0 deletions
