mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
treewide: Remove uses of builtins.toPath.
toPath has confusing semantics and is never necessary; it can always either just be omitted or replaced by pre-concatenating `/.`. It has been marked as "!!! obsolete?" for more than 10 years in a C++ comment, hopefully removing it will let us properly deprecate and, eventually, remove it.
This commit is contained in:
parent
74083c8cd7
commit
6da6accd30
11 changed files with 14 additions and 15 deletions
|
@ -97,7 +97,7 @@ runTests {
|
|||
storePathAppendix = isStorePath
|
||||
"${goodPath}/bin/python";
|
||||
nonAbsolute = isStorePath (concatStrings (tail (stringToCharacters goodPath)));
|
||||
asPath = isStorePath (builtins.toPath goodPath);
|
||||
asPath = isStorePath goodPath;
|
||||
otherPath = isStorePath "/something/else";
|
||||
otherVals = {
|
||||
attrset = isStorePath {};
|
||||
|
@ -318,7 +318,7 @@ runTests {
|
|||
int = 42;
|
||||
bool = true;
|
||||
string = ''fno"rd'';
|
||||
path = /. + "/foo"; # toPath returns a string
|
||||
path = /. + "/foo";
|
||||
null_ = null;
|
||||
function = x: x;
|
||||
functionArgs = { arg ? 4, foo }: arg;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue