John Ericson
6a0582d9fd
Rename file to avoid reserved name
2024-07-02 09:26:22 -04:00
John Ericson
2c184f694b
Ensure we have data dir for libexpr unit tests
2024-07-02 09:26:22 -04:00
John Ericson
46ec69a483
Everything builds in the dev shell now
2024-07-02 09:26:22 -04:00
John Ericson
429d6ae2b5
Add missing package.nix
2024-07-02 09:26:22 -04:00
John Ericson
0b539dea4a
Improve boost hacks
2024-07-02 09:26:22 -04:00
John Ericson
8399bd6b8f
Dedup
2024-07-02 09:26:21 -04:00
John Ericson
8198888bc4
More dedup
2024-07-02 09:23:25 -04:00
John Ericson
d6f57f3260
More dedup
2024-07-02 09:23:25 -04:00
John Ericson
c88f83b471
More dedup
2024-07-02 09:23:25 -04:00
John Ericson
4609ab318c
Fix internal API docs
2024-07-02 09:23:25 -04:00
John Ericson
d902481a36
Better org
2024-07-02 09:23:25 -04:00
John Ericson
a81e319528
Deduplicating
2024-07-02 09:23:24 -04:00
John Ericson
17a8c2bfce
Unit tests and external libraries
2024-07-02 09:23:24 -04:00
John Ericson
4fa8068b78
Mesonify other external API
2024-07-02 09:23:24 -04:00
John Ericson
31257009e1
Meson build for libexpr and libflake
2024-07-02 09:23:24 -04:00
John Ericson
fbdc554908
Fix Nix shell for building Perl too
2024-07-02 09:23:24 -04:00
Jörg Thalheim
101915c9b7
enable -Werror=unused-result
...
Inspired by
010ff57ebb
From the original PR:
> We do not have any of these warnings appearing at the moment, but
> it seems like a good idea to enable [[nodiscard]] checking anyway.
> Once we start introducing more functions with must-use conditions we will
> need such checking, and the rust stdlib has proven them very useful.
2024-07-02 08:46:06 +02:00
Robert Hensing
f0329568b5
GitFileSystemObjectSink: catch an overflow
2024-07-01 17:29:07 +02:00
Robert Hensing
1fac22b16e
GitFileSystemObjectSink: Add path context to some messages
2024-07-01 17:29:07 +02:00
Robert Hensing
992912f3b4
test-support: Add TracingFileSystemObjectSink
2024-07-01 17:29:07 +02:00
Eelco Dolstra
10c9764c27
Merge pull request #10992 from hercules-ci/issue-10947-dont-cache-disallowed-ifd
...
Fix #10947 ; don't cache disallowed IFD
2024-07-01 11:20:27 +02:00
Robert Hensing
93b50857ed
packaging: Restore .version value altering behavior
2024-06-30 19:44:36 +02:00
Robert Hensing
7dd938b228
libutil/package.nix: Remove .version symlink replacement solution
2024-06-30 19:44:04 +02:00
siddhantCodes
72bb530141
use CanonPath in fs-sink and its derivatives
2024-06-30 19:03:15 +05:30
Robert Hensing
b2c7f09b0a
Fix underflow in Printer::printList
...
Analogous to 9b88bf8adf / three commits back
2024-06-29 14:10:58 +02:00
Robert Hensing
bfc5416240
Refactor: rename ValuePrinter::totalListItemsPrinted
2024-06-29 14:02:28 +02:00
Robert Hensing
ce1dc87711
Refactor: rename ValuePrinter::totalAttrsPrinted
...
Make it more distinct from the attrs printed of any specific
attrset.
2024-06-29 14:01:15 +02:00
Robert Hensing
9b88bf8adf
Fix underflow in Printer::printAttrs
...
The code that counts the number of elided attrs incorrectly used the
per-printer "global" attribute counter instead of a counter that
was relevant only to the current attribute set.
This bug flew under the radar because often the attribute sets aren't
nested, not big enough, or we wouldn't pay attention to the numbers.
I've noticed the issue because the difference underflowed.
Although this behavior is tested by the functional test
lang/eval-fail-bad-string-interpolation-4.nix, the underflow slipped
through review. A simpler reproducer would be as follows, but I
haven't added it to the test suite to keep it simple and marginally
faster.
```
$ nix run nix/2.23.1 -- eval --expr '"" + (let v = { a = { a = 1; b = 2; c = 1; d = 1; e = 1; f = 1; g = 1; h = 1; }; b = { a = 1; b = 1; c = 1; }; }; in builtins.deepSeq v v)'
error:
… while evaluating a path segment
at «string»:1:6:
1| "" + (let v = { a = { a = 1; b = 2; c = 1; d = 1; e = 1; f = 1; g = 1; h = 1; }; b = { a = 1; b = 1; c = 1; }; }; in builtins.deepSeq v v)
| ^
error: cannot coerce a set to a string: { a = { a = 1; b = 2; c = 1; d = 1; e = 1; f = 1; g = 1; h = 1; }; b = { a = 1; «4294967289 attributes elided» }; }
```
2024-06-29 13:53:05 +02:00
Robert Hensing
fd94b74ee5
Fix #10947 ; don't cache disallowed IFD
2024-06-29 13:19:04 +02:00
Cole Helbling
d906d42330
Restore commit-lock-file-summary rename for consistency
...
It was originally renamed in https://github.com/NixOS/nix/pull/10691 ,
but https://github.com/NixOS/nix/pull/9063 accidentally removed the new
name and alias.
2024-06-28 14:53:40 -07:00
Winter
149d8eb8aa
Stop vendoring toml11
...
We don't apply any patches to it, and vendoring it locks users into
bugs (it hasn't been updated since its introduction in late 2021).
Closes https://git.lix.systems/lix-project/lix/issues/164
Change-Id: Ied071c841fc30b0dfb575151afd1e7f66970fdb9
(cherry picked from commit 80405d06264f0de1c16ee2646388ab501df20628)
2024-06-26 22:27:13 -04:00
John Ericson
f002f85861
Avoid libmain header in libexpr
...
We just don't need it!
2024-06-26 22:26:45 -04:00
John Ericson
7181d1f4a1
Reformat
...
Factored out code is now elegible for formatting.
2024-06-26 19:56:21 -04:00
John Ericson
0084a486cc
Split out a new libnixflake
...
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-06-26 19:56:21 -04:00
John Ericson
52730d38e2
Factor out flake:... lookup path from evaluator
...
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-06-26 19:56:21 -04:00
John Ericson
8a420162ab
Merge branch 'master' into fix-sandbox-escape
2024-06-26 18:11:39 -04:00
Robert Hensing
85de5a60c7
Use lib instead of explicit fileset passing
2024-06-26 04:11:20 +02:00
Robert Hensing
6fe8fb967a
libstore/worker.hh: Document Worker
2024-06-26 01:43:31 +02:00
Robert Hensing
fd0b376c79
libstore/worker.cc: Remove outdated comment
...
It was added above this conditional
Worker::Worker(LocalStore & store)
: store(store)
{
/* Debugging: prevent recursive workers. */
if (working) abort();
working = true;
However, `working` has since been removed.
Source: https://github.com/NixOS/nix/blame/7f8e805c8ef2d7728648553de6b762964730a09a/src/libstore/build.cc#L2617
2024-06-26 01:43:31 +02:00
John Ericson
65d7c80365
Merge pull request #10955 from NixOS/meson-nix-util-c
...
Build nix-util-c with meson + unit tests
2024-06-25 19:06:06 -04:00
Robert Hensing
ac89828b5a
Build nix-util-c with meson and unit test
2024-06-25 21:35:23 +02:00
Robert Hensing
7df9d6da65
Improve error messages for invalid derivation names
2024-06-25 19:41:29 +02:00
John Ericson
5f4f789144
Merge pull request #10954 from NixOS/ci-meson
...
ci.yml: Add meson_build
2024-06-25 09:02:33 -04:00
Robert Hensing
0674be8d49
nix-util: Fix build
2024-06-25 10:26:57 +02:00
Brian McKenna
5be44d235a
Guard uses of lutimes, for portability
2024-06-24 17:35:34 -04:00
John Ericson
05580a373f
Fix error in the no-GC build
2024-06-24 17:18:16 -04:00
Robert Hensing
c66f1e7660
Merge pull request #10913 from NixOS/no-global-eval-settings-in-libexpr
...
No global eval settings in `libnixexpr`
2024-06-24 18:52:19 +02:00
John Ericson
fda4c78921
Merge pull request #10951 from obsidiansystems/load-just-one-config
...
Small global config refactors
2024-06-24 12:38:04 -04:00
John Ericson
52bfccf8d8
No global eval settings in libnixexpr
...
Progress on #5638
There is still a global eval settings, but it pushed down into
`libnixcmd`, which is a lot less bad a place for this sort of thing.
2024-06-24 12:15:16 -04:00
John Ericson
cb0c868da4
Allow loading config files into other config objects
...
This gives us some hope of moving away from global variables.
2024-06-24 12:07:56 -04:00