mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 14:36:16 +02:00
Remove some FIXMEs
This commit is contained in:
parent
1b8065f255
commit
85c1959240
5 changed files with 3 additions and 13 deletions
|
@ -532,12 +532,12 @@ EvalState::~EvalState()
|
||||||
|
|
||||||
void EvalState::allowPath(const Path & path)
|
void EvalState::allowPath(const Path & path)
|
||||||
{
|
{
|
||||||
rootFS->allowPath(CanonPath(path)); // FIXME
|
rootFS->allowPath(CanonPath(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EvalState::allowPath(const StorePath & storePath)
|
void EvalState::allowPath(const StorePath & storePath)
|
||||||
{
|
{
|
||||||
rootFS->allowPath(CanonPath(store->toRealPath(storePath))); // FIXME
|
rootFS->allowPath(CanonPath(store->toRealPath(storePath)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EvalState::allowAndSetStorePathString(const StorePath & storePath, Value & v)
|
void EvalState::allowAndSetStorePathString(const StorePath & storePath, Value & v)
|
||||||
|
|
|
@ -509,11 +509,6 @@ string_parts_interpolated
|
||||||
path_start
|
path_start
|
||||||
: PATH {
|
: PATH {
|
||||||
SourcePath path { data->basePath.accessor, CanonPath({$1.p, $1.l}, data->basePath.path) };
|
SourcePath path { data->basePath.accessor, CanonPath({$1.p, $1.l}, data->basePath.path) };
|
||||||
#if 0
|
|
||||||
/* add back in the trailing '/' to the first segment */
|
|
||||||
if ($1.p[$1.l-1] == '/' && $1.l > 1)
|
|
||||||
path.path += "/";
|
|
||||||
#endif
|
|
||||||
$$ = new ExprPath(std::move(path));
|
$$ = new ExprPath(std::move(path));
|
||||||
}
|
}
|
||||||
| HPATH {
|
| HPATH {
|
||||||
|
@ -700,7 +695,6 @@ Expr * EvalState::parseExprFromFile(const SourcePath & path, std::shared_ptr<Sta
|
||||||
auto buffer = path.readFile();
|
auto buffer = path.readFile();
|
||||||
// readFile hopefully have left some extra space for terminators
|
// readFile hopefully have left some extra space for terminators
|
||||||
buffer.append("\0\0", 2);
|
buffer.append("\0\0", 2);
|
||||||
// FIXME: pass SourcePaths
|
|
||||||
return parse(buffer.data(), buffer.size(), Pos::Origin(path), path.parent(), staticEnv);
|
return parse(buffer.data(), buffer.size(), Pos::Origin(path), path.parent(), staticEnv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -369,7 +369,6 @@ void prim_exec(EvalState & state, const PosIdx pos, Value * * args, Value & v)
|
||||||
auto output = runProgram(program, true, commandArgs);
|
auto output = runProgram(program, true, commandArgs);
|
||||||
Expr * parsed;
|
Expr * parsed;
|
||||||
try {
|
try {
|
||||||
//auto base = state.positions[pos];
|
|
||||||
parsed = state.parseExprFromString(std::move(output), state.rootPath("/"));
|
parsed = state.parseExprFromString(std::move(output), state.rootPath("/"));
|
||||||
} catch (Error & e) {
|
} catch (Error & e) {
|
||||||
e.addTrace(state.positions[pos], "While parsing the output from '%1%'", program);
|
e.addTrace(state.positions[pos], "While parsing the output from '%1%'", program);
|
||||||
|
|
|
@ -57,14 +57,12 @@ namespace nix {
|
||||||
ASSERT_EQ(getJSONValue(v), "\"test\\\"\"");
|
ASSERT_EQ(getJSONValue(v), "\"test\\\"\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
// The dummy store doesn't support writing files. Fails with this exception message:
|
// The dummy store doesn't support writing files. Fails with this exception message:
|
||||||
// C++ exception with description "error: operation 'addToStoreFromDump' is
|
// C++ exception with description "error: operation 'addToStoreFromDump' is
|
||||||
// not supported by store 'dummy'" thrown in the test body.
|
// not supported by store 'dummy'" thrown in the test body.
|
||||||
TEST_F(JSONValueTest, DISABLED_Path) {
|
TEST_F(JSONValueTest, DISABLED_Path) {
|
||||||
Value v;
|
Value v;
|
||||||
v.mkPath("test");
|
v.mkPath(state.rootPath("/test"));
|
||||||
ASSERT_EQ(getJSONValue(v), "\"/nix/store/g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-x\"");
|
ASSERT_EQ(getJSONValue(v), "\"/nix/store/g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-x\"");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
} /* namespace nix */
|
} /* namespace nix */
|
||||||
|
|
|
@ -34,7 +34,6 @@ void printValueAsJSON(EvalState & state, bool strict,
|
||||||
|
|
||||||
case nPath:
|
case nPath:
|
||||||
if (copyToStore)
|
if (copyToStore)
|
||||||
// FIXME: handle accessors
|
|
||||||
out.write(
|
out.write(
|
||||||
state.store->printStorePath(
|
state.store->printStorePath(
|
||||||
state.copyPathToStore(context, v.path())));
|
state.copyPathToStore(context, v.path())));
|
||||||
|
|
Loading…
Reference in a new issue