Compare commits
10 Commits
2.11-maint
...
2.6.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e044ccb67c | ||
|
|
d0632f4c48 | ||
|
|
573b3aab66 | ||
|
|
5d00dc9d67 | ||
|
|
bda64b4b65 | ||
|
|
a07ecbc548 | ||
|
|
32a7724c22 | ||
|
|
45ed4e6178 | ||
|
|
21c23031c1 | ||
|
|
a1cd7e5860 |
@@ -71,7 +71,6 @@
|
||||
- [Hacking](contributing/hacking.md)
|
||||
- [CLI guideline](contributing/cli-guideline.md)
|
||||
- [Release Notes](release-notes/release-notes.md)
|
||||
- [Release X.Y (202?-??-??)](release-notes/rl-next.md)
|
||||
- [Release 2.6 (2022-01-24)](release-notes/rl-2.6.md)
|
||||
- [Release 2.5 (2021-12-13)](release-notes/rl-2.5.md)
|
||||
- [Release 2.4 (2021-11-01)](release-notes/rl-2.4.md)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
then ""
|
||||
else "pre${builtins.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101")}_${self.shortRev or "dirty"}";
|
||||
|
||||
officialRelease = false;
|
||||
officialRelease = true;
|
||||
|
||||
linux64BitSystems = [ "x86_64-linux" "aarch64-linux" ];
|
||||
linuxSystems = linux64BitSystems ++ [ "i686-linux" ];
|
||||
|
||||
@@ -590,7 +590,7 @@ create_directories() {
|
||||
"$get_chr_own" -R "root:$NIX_BUILD_GROUP_NAME" "$NIX_ROOT" || true
|
||||
fi
|
||||
_sudo "to make the basic directory structure of Nix (part 1)" \
|
||||
install -dv -m 0755 /nix /nix/var /nix/var/log /nix/var/log/nix /nix/var/log/nix/drvs /nix/var/nix{,/db,/gcroots,/profiles,/temproots,/userpool} /nix/var/nix/{gcroots,profiles}/per-user
|
||||
install -dv -m 0755 /nix /nix/var /nix/var/log /nix/var/log/nix /nix/var/log/nix/drvs /nix/var/nix{,/db,/gcroots,/profiles,/temproots,/userpool,/daemon-socket} /nix/var/nix/{gcroots,profiles}/per-user
|
||||
|
||||
_sudo "to make the basic directory structure of Nix (part 2)" \
|
||||
install -dv -g "$NIX_BUILD_GROUP_NAME" -m 1775 /nix/store
|
||||
|
||||
@@ -364,15 +364,19 @@ struct StaticEnv
|
||||
|
||||
void sort()
|
||||
{
|
||||
std::sort(vars.begin(), vars.end(),
|
||||
std::stable_sort(vars.begin(), vars.end(),
|
||||
[](const Vars::value_type & a, const Vars::value_type & b) { return a.first < b.first; });
|
||||
}
|
||||
|
||||
void deduplicate()
|
||||
{
|
||||
const auto last = std::unique(vars.begin(), vars.end(),
|
||||
[] (const Vars::value_type & a, const Vars::value_type & b) { return a.first == b.first; });
|
||||
vars.erase(last, vars.end());
|
||||
auto it = vars.begin(), jt = it, end = vars.end();
|
||||
while (jt != end) {
|
||||
*it = *jt++;
|
||||
while (jt != end && it->first == jt->first) *it = *jt++;
|
||||
it++;
|
||||
}
|
||||
vars.erase(it, end);
|
||||
}
|
||||
|
||||
Vars::const_iterator find(const Symbol & name) const
|
||||
|
||||
@@ -405,7 +405,7 @@ expr_select
|
||||
expr_simple
|
||||
: ID {
|
||||
std::string_view s = "__curPos";
|
||||
if (strncmp($1.p, s.data(), s.size()) == 0)
|
||||
if ($1.l == s.size() && strncmp($1.p, s.data(), s.size()) == 0)
|
||||
$$ = new ExprPos(CUR_POS);
|
||||
else
|
||||
$$ = new ExprVar(CUR_POS, data->symbols.create($1));
|
||||
|
||||
@@ -128,7 +128,7 @@ struct curlFileTransfer : public FileTransfer
|
||||
if (requestHeaders) curl_slist_free_all(requestHeaders);
|
||||
try {
|
||||
if (!done)
|
||||
fail(FileTransferError(Interrupted, nullptr, "download of '%s' was interrupted", request.uri));
|
||||
fail(FileTransferError(Interrupted, {}, "download of '%s' was interrupted", request.uri));
|
||||
} catch (...) {
|
||||
ignoreException();
|
||||
}
|
||||
@@ -704,7 +704,7 @@ struct curlFileTransfer : public FileTransfer
|
||||
auto s3Res = s3Helper.getObject(bucketName, key);
|
||||
FileTransferResult res;
|
||||
if (!s3Res.data)
|
||||
throw FileTransferError(NotFound, nullptr, "S3 object '%s' does not exist", request.uri);
|
||||
throw FileTransferError(NotFound, {}, "S3 object '%s' does not exist", request.uri);
|
||||
res.data = std::move(*s3Res.data);
|
||||
callback(std::move(res));
|
||||
#else
|
||||
|
||||
@@ -147,7 +147,7 @@ Path canonPath(PathView path, bool resolveSymlinks)
|
||||
path = {};
|
||||
} else {
|
||||
s += path.substr(0, slash);
|
||||
path = path.substr(slash + 1);
|
||||
path = path.substr(slash);
|
||||
}
|
||||
|
||||
/* If s points to a symlink, resolve it and continue from there */
|
||||
|
||||
1
tests/lang/eval-okay-regression-20220125.exp
Normal file
1
tests/lang/eval-okay-regression-20220125.exp
Normal file
@@ -0,0 +1 @@
|
||||
3
|
||||
2
tests/lang/eval-okay-regression-20220125.nix
Normal file
2
tests/lang/eval-okay-regression-20220125.nix
Normal file
@@ -0,0 +1,2 @@
|
||||
((__curPosFoo: __curPosFoo) 1) + ((__curPosBar: __curPosBar) 2)
|
||||
|
||||
@@ -40,3 +40,26 @@ testRepl () {
|
||||
testRepl
|
||||
# Same thing (kind-of), but with a remote store.
|
||||
testRepl --store "$TEST_ROOT/store?real=$NIX_STORE_DIR"
|
||||
|
||||
testReplResponse () {
|
||||
local response="$(nix repl <<< "$1")"
|
||||
echo "$response" | grep -qs "$2" \
|
||||
|| fail "repl command set:
|
||||
|
||||
$1
|
||||
|
||||
does not respond with:
|
||||
|
||||
$2
|
||||
|
||||
but with:
|
||||
|
||||
$response"
|
||||
}
|
||||
|
||||
# :a uses the newest version of a symbol
|
||||
testReplResponse '
|
||||
:a { a = "1"; }
|
||||
:a { a = "2"; }
|
||||
"result: ${a}"
|
||||
' "result: 2"
|
||||
|
||||
Reference in New Issue
Block a user