update and fix build with latest Lix #14
|
@ -350,18 +350,18 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
/* FIXME: The build hook in conjunction with import-from-derivation is
|
/* FIXME: The build hook in conjunction with import-from-derivation is
|
||||||
* causing "unexpected EOF" during eval */
|
* causing "unexpected EOF" during eval */
|
||||||
settings.builders = "";
|
settings.builders.setDefault("");
|
||||||
|
|||||||
|
|
||||||
/* Prevent access to paths outside of the Nix search path and
|
/* Prevent access to paths outside of the Nix search path and
|
||||||
to the environment. */
|
to the environment. */
|
||||||
evalSettings.restrictEval = false;
|
evalSettings.restrictEval.setDefault(false);
|
||||||
alois31
commented
This does not make sense at all, as the default is This does not make sense at all, as the default is `false` already. You either want to override it or delete this entirely. Or judging by the comment, `false` is a typo to begin with and this should set the default to `true` (but still allowing the user to override it)?
qyriad
commented
Oh that comment makes this very confusing then. The CLI doesn't seem to have any way to specify this in the first place? Should we just leave it as Oh that comment makes this very confusing then. The CLI doesn't seem to have any way to specify this in the first place? Should we just leave it as `false` since that's what it's been, and add a FIXME?
alois31
commented
Looking at the blame of this code, it seems that the comment was added along with explicitly setting this to Looking at the blame of this code, it seems that the comment was added along with explicitly setting this to `true`, and when it was later set to `false` some time later (presumably because breakage in some situations was noticed), the comment was left. I'm not really qualified to comment on this because I'm not familiar with this codebase, but my gut feeling is that this code should be deleted entirely and the user can pass `--option restrict-eval true` if they really want to enable restricted eval mode.
|
|||||||
|
|
||||||
/* When building a flake, use pure evaluation (no access to
|
/* When building a flake, use pure evaluation (no access to
|
||||||
'getEnv', 'currentSystem' etc. */
|
'getEnv', 'currentSystem' etc. */
|
||||||
if (myArgs.impure) {
|
if (myArgs.impure) {
|
||||||
evalSettings.pureEval = false;
|
evalSettings.pureEval.setDefault(false);
|
||||||
alois31
commented
This wants to be override (and I guess things would be easier to understand here without the weird This wants to be override (and I guess things would be easier to understand here without the weird `else if`).
|
|||||||
} else if (myArgs.flake) {
|
} else if (myArgs.flake) {
|
||||||
evalSettings.pureEval = true;
|
evalSettings.pureEval.setDefault(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (myArgs.releaseExpr == "")
|
if (myArgs.releaseExpr == "")
|
||||||
|
@ -374,7 +374,7 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (myArgs.showTrace) {
|
if (myArgs.showTrace) {
|
||||||
loggerSettings.showTrace.assign(true);
|
loggerSettings.showTrace.override(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Sync<State> state_;
|
Sync<State> state_;
|
||||||
|
|
Not sure if this makes sense, if it breaks stuff it should be overridden, and if it doesn't why do it at all?