[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
100/376: Rename nixPath to __nixPath
From: |
Ludovic Courtès |
Subject: |
100/376: Rename nixPath to __nixPath |
Date: |
Wed, 28 Jan 2015 22:04:19 +0000 |
civodul pushed a commit to tag 1.8
in repository guix.
commit 3d221a7bb13a864a50c549f66032ead2bf5aaec0
Author: Eelco Dolstra <address@hidden>
Date: Wed Jul 30 11:27:34 2014 +0200
Rename nixPath to __nixPath
The name ‘nixPath’ breaks existing code.
---
src/libexpr/parser.y | 2 +-
src/libexpr/primops.cc | 4 ++--
tests/lang/eval-okay-search-path.nix | 8 ++++----
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y
index a27c530..a19269b 100644
--- a/src/libexpr/parser.y
+++ b/src/libexpr/parser.y
@@ -388,7 +388,7 @@ expr_simple
string path($1 + 1, strlen($1) - 2);
$$ = new ExprApp(CUR_POS,
new ExprApp(new ExprVar(data->symbols.create("__findFile")),
- new ExprVar(data->symbols.create("nixPath"))),
+ new ExprVar(data->symbols.create("__nixPath"))),
new ExprString(data->symbols.create(path)));
}
| URI { $$ = new ExprString(data->symbols.create($1)); }
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 543266b..4436b63 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -710,7 +710,7 @@ static void prim_readFile(EvalState & state, const Pos &
pos, Value * * args, Va
/* Find a file in the Nix search path. Used to implement <x> paths,
- which are desugared to ‘findFile nixPath "x"’. */
+ which are desugared to ‘findFile __nixPath "x"’. */
static void prim_findFile(EvalState & state, const Pos & pos, Value * * args,
Value & v)
{
state.forceList(*args[0], pos);
@@ -1472,7 +1472,7 @@ void EvalState::createBaseEnv()
mkString(*allocAttr(*v2, symbols.create("prefix")), i.first);
v2->attrs->sort();
}
- addConstant("nixPath", v);
+ addConstant("__nixPath", v);
/* Now that we've added all primops, sort the `builtins' set,
because attribute lookups expect it to be sorted. */
diff --git a/tests/lang/eval-okay-search-path.nix
b/tests/lang/eval-okay-search-path.nix
index f48bf3f..cca41f8 100644
--- a/tests/lang/eval-okay-search-path.nix
+++ b/tests/lang/eval-okay-search-path.nix
@@ -3,9 +3,9 @@ with builtins;
assert pathExists <nix/buildenv.nix>;
-assert length nixPath == 6;
-assert length (filter (x: x.prefix == "nix") nixPath) == 1;
-assert length (filter (x: baseNameOf x.path == "dir4") nixPath) == 1;
+assert length __nixPath == 6;
+assert length (filter (x: x.prefix == "nix") __nixPath) == 1;
+assert length (filter (x: baseNameOf x.path == "dir4") __nixPath) == 1;
import <a.nix> + import <b.nix> + import <c.nix> + import <dir5/c.nix>
- + (let nixPath = [ { path = ./dir2; } { path = ./dir1; } ]; in import
<a.nix>)
+ + (let __nixPath = [ { path = ./dir2; } { path = ./dir1; } ]; in import
<a.nix>)
- 83/376: Fix bogus pass by reference, (continued)
- 83/376: Fix bogus pass by reference, Ludovic Courtès, 2015/01/28
- 88/376: Refactor, Ludovic Courtès, 2015/01/28
- 87/376: tests/remote-builds.nix: Test failing build, Ludovic Courtès, 2015/01/28
- 89/376: build-remote.pl: Be less verbose on failing builds, Ludovic Courtès, 2015/01/28
- 86/376: nix-store --serve: Only monitor stdin during builds, Ludovic Courtès, 2015/01/28
- 77/376: nix-daemon: Less verbosity, Ludovic Courtès, 2015/01/28
- 74/376: nix-daemon: Use a thread instead of SIGPOLL to catch client disconnects, Ludovic Courtès, 2015/01/28
- 99/376: install-nix-from-closure.sh: Install cacert, Ludovic Courtès, 2015/01/28
- 93/376: nix-copy-closure: Implement --gzip via ssh's -C flag, Ludovic Courtès, 2015/01/28
- 91/376: Remove obsolete SSH master connection code, Ludovic Courtès, 2015/01/28
- 100/376: Rename nixPath to __nixPath,
Ludovic Courtès <=
- 95/376: Change the default for use-ssh-substituter to ‘true’, Ludovic Courtès, 2015/01/28
- 90/376: Implement nix-copy-closure --from via nix-store --serve, Ludovic Courtès, 2015/01/28
- 97/376: Remove outdated AUTHORS file, Ludovic Courtès, 2015/01/28
- 92/376: Fix NIX_SSHOPTS, Ludovic Courtès, 2015/01/28
- 103/376: Allow regular files as GC roots, Ludovic Courtès, 2015/01/28
- 94/376: nix-copy-closure: Drop --bzip2, --xz, --show-progress, Ludovic Courtès, 2015/01/28
- 84/376: Use pthread_cancel instead of a signal, Ludovic Courtès, 2015/01/28
- 102/376: Restore default SIGPIPE handler before invoking ‘man’, Ludovic Courtès, 2015/01/28
- 98/376: nix-profile.sh: Set $SSL_CERT_FILE, Ludovic Courtès, 2015/01/28
- 96/376: nix-daemon: Pass on the user's $SSH_AUTH_SOCK to the SSH substituter, Ludovic Courtès, 2015/01/28