about summary refs log tree commit diff
path: root/src/nix-env/nix-env.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-09-03T10·56+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-09-03T11·01+0200
commit6f809194d7448c4ad50174bed9ba2419e2114352 (patch)
tree03e493977baf95671cb652b197772376c68fe130 /src/nix-env/nix-env.cc
parent57d18df7d0005cf822368d9f1d0c33396c6b9f9f (diff)
Get rid of the parse tree cache
Since we already cache files in normal form (fileEvalCache), caching
parse trees is redundant.

Note that getting rid of this cache doesn't actually save much memory
at the moment, because parse trees are currently not freed / GC'ed.
Diffstat (limited to 'src/nix-env/nix-env.cc')
-rw-r--r--src/nix-env/nix-env.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc
index 9ed3eccf39a3..1cb1ec483339 100644
--- a/src/nix-env/nix-env.cc
+++ b/src/nix-env/nix-env.cc
@@ -131,7 +131,7 @@ static void getAllExprs(EvalState & state,
             if (hasSuffix(attrName, ".nix"))
                 attrName = string(attrName, 0, attrName.size() - 4);
             attrs.attrs[state.symbols.create(attrName)] =
-                ExprAttrs::AttrDef(state.parseExprFromFile(absPath(path2)), noPos);
+                ExprAttrs::AttrDef(state.parseExprFromFile(resolveExprPath(absPath(path2))), noPos);
         }
         else
             /* `path2' is a directory (with no default.nix in it);
@@ -143,7 +143,7 @@ static void getAllExprs(EvalState & state,
 
 static Expr * loadSourceExpr(EvalState & state, const Path & path)
 {
-    if (isNixExpr(path)) return state.parseExprFromFile(absPath(path));
+    if (isNixExpr(path)) return state.parseExprFromFile(resolveExprPath(absPath(path)));
 
     /* The path is a directory.  Put the Nix expressions in the
        directory in an attribute set, with the file name of each