diff options
author | Silvan Mosberger <silvan.mosberger@tweag.io> | 2023-10-26 01:56:42 +0200 |
---|---|---|
committer | Silvan Mosberger <silvan.mosberger@tweag.io> | 2023-10-30 12:48:11 +0100 |
commit | 0f6cc8018c7b7f9244f06ad8072ab017808ad0c2 (patch) | |
tree | b1746170a077fc3c184a4dd09bf8a0a4abae325f /lib/fileset/tests.sh | |
parent | 88f736f871452cf064689b4098bc92bfb5aef070 (diff) |
lib.fileset.toSource: Improve error for unknown file types
This does decrease performance unfortunately Benchmarking expression toSource { root = ./.; fileset = ./.; } Mean CPU time 0.103747 (σ = 0.012415) for 10 runs is 97.32181384964636% (σ = 16.34179537413021%) of the old value 0.106602 (σ = 0.0125571) Statistic .envs.elements (205920) is 105.5842% (+10891) of the old value 195029 Statistic .gc.totalBytes (20247696) is 101.7495% (+348160) of the old value 19899536 Statistic .nrThunks (134824) is 108.7878% (+10891) of the old value 123933 Statistic .symbols.number (996) is 100.1005% (+1) of the old value 995 Statistic .values.number (275238) is 104.1199% (+10891) of the old value 264347
Diffstat (limited to 'lib/fileset/tests.sh')
-rwxr-xr-x | lib/fileset/tests.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/fileset/tests.sh b/lib/fileset/tests.sh index 86ef1989f60b5..5b756b8fc5931 100755 --- a/lib/fileset/tests.sh +++ b/lib/fileset/tests.sh @@ -356,7 +356,9 @@ rm -rf -- * # non-regular and non-symlink files cannot be added to the Nix store mkfifo a -expectFailure 'toSource { root = ./.; fileset = ./a; }' 'file '\'"$work"'/a'\'' has an unsupported type' +expectFailure 'toSource { root = ./.; fileset = ./a; }' 'lib.fileset.toSource: `fileset` contains a file that cannot be added to the store: '"$work"'/a +\s*This file is neither a regular file nor a symlink, the only file types supported by the Nix store. +\s*Therefore the file set cannot be added to the Nix store as is. Make sure to not include that file to avoid this error.' rm -rf -- * # Path coercion only works for paths |