Remove some FIXMEs

This commit is contained in:
Eelco Dolstra 2022-09-12 15:10:54 +02:00
parent 1b8065f255
commit 85c1959240
5 changed files with 3 additions and 13 deletions

View file

@ -532,12 +532,12 @@ EvalState::~EvalState()
void EvalState::allowPath(const Path & path)
{
rootFS->allowPath(CanonPath(path)); // FIXME
rootFS->allowPath(CanonPath(path));
}
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)

View file

@ -509,11 +509,6 @@ string_parts_interpolated
path_start
: 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));
}
| HPATH {
@ -700,7 +695,6 @@ Expr * EvalState::parseExprFromFile(const SourcePath & path, std::shared_ptr<Sta
auto buffer = path.readFile();
// readFile hopefully have left some extra space for terminators
buffer.append("\0\0", 2);
// FIXME: pass SourcePaths
return parse(buffer.data(), buffer.size(), Pos::Origin(path), path.parent(), staticEnv);
}

View file

@ -369,7 +369,6 @@ void prim_exec(EvalState & state, const PosIdx pos, Value * * args, Value & v)
auto output = runProgram(program, true, commandArgs);
Expr * parsed;
try {
//auto base = state.positions[pos];
parsed = state.parseExprFromString(std::move(output), state.rootPath("/"));
} catch (Error & e) {
e.addTrace(state.positions[pos], "While parsing the output from '%1%'", program);

View file

@ -57,14 +57,12 @@ namespace nix {
ASSERT_EQ(getJSONValue(v), "\"test\\\"\"");
}
#if 0
// The dummy store doesn't support writing files. Fails with this exception message:
// C++ exception with description "error: operation 'addToStoreFromDump' is
// not supported by store 'dummy'" thrown in the test body.
TEST_F(JSONValueTest, DISABLED_Path) {
Value v;
v.mkPath("test");
v.mkPath(state.rootPath("/test"));
ASSERT_EQ(getJSONValue(v), "\"/nix/store/g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-x\"");
}
#endif
} /* namespace nix */

View file

@ -34,7 +34,6 @@ void printValueAsJSON(EvalState & state, bool strict,
case nPath:
if (copyToStore)
// FIXME: handle accessors
out.write(
state.store->printStorePath(
state.copyPathToStore(context, v.path())));