Robert Hensing
d3e49ac881
dropEmptyInitThenConcatStringsSep -> concatStringSep: shortRefs are not empty
2024-07-13 03:06:24 +02:00
Robert Hensing
a681d354e7
Add fresh concatStringsSep without bug
...
The buggy version was previously renamed to
dropEmptyInitThenConcatStringsSep
2024-07-13 03:06:24 +02:00
Robert Hensing
1a8defd06f
Refactor: rename C++ concatStringsSep -> dropEmptyInitThenConcatStringsSep
2024-07-13 03:05:50 +02:00
John Ericson
bc83b9dc1f
Remove comparator.hh
and switch to <=>
in a bunch of places
...
Known behavior changes:
- `MemorySourceAccessor`'s comparison operators no longer forget to
compare the `SourceAccessor` base class.
Progress on #10832
What remains for that issue is hopefully much easier!
2024-07-12 14:54:18 -04:00
John Ericson
337a5a23b7
Merge pull request #11089 from NixOS/warnings-includes
...
Fix warnings and optimize includes
2024-07-12 10:29:26 -04:00
Robert Hensing
8df041cbc6
Solve unused header warnings reported by clangd
2024-07-12 15:37:54 +02:00
John Ericson
3fc77f281e
No global settings in libnixfetchers
and libnixflake
...
Progress on #5638
There are still a global fetcher and eval settings, but they are pushed
down into `libnixcmd`, which is a lot less bad a place for this sort of
thing.
Continuing process pioneered in
52bfccf8d8
.
2024-07-12 08:50:28 -04:00
Robert Hensing
4fd8f19ecf
Fix build to use CanonPath in new FSO sinks
2024-07-11 12:14:48 +02:00
Robert Hensing
86420753ec
Merge remote-tracking branch 'upstream/master' into support-hardlinks-in-tarballs
2024-07-11 11:43:02 +02:00
John Ericson
c5284a84f3
Forgot to include config-expr.hh
in some places
2024-07-08 10:37:34 -04:00
Robert Hensing
bea54d116e
Add resolvePath, filesetToSource indirections for Nixpkgs
2024-07-06 19:49:55 +02:00
Robert Hensing
0729f0a113
packaging: Pass version directly
2024-07-06 17:52:57 +02:00
Robert Hensing
ddff76f667
Merge pull request #10973 from NixOS/meson-libexpr
...
Meson build for libexpr libflake, external C API, unit tests
2024-07-05 20:27:12 +02:00
John Ericson
e4056b9afd
Apply suggestions from code review
...
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-07-04 17:48:27 -04:00
John Ericson
30de61f16d
Merge pull request #11018 from siddhantk232/canonpath-fs-sink
...
Use `CanonPath` in `fs-sink.hh`
2024-07-03 10:36:18 -04:00
siddhantCodes
2cf24a2df0
fix tests and minor changes
...
- use the iterator in `CanonPath` to count `level`
- use the `CanonPath::basename` method
- use `CanonPath::root` instead of `CanonPath{""}`
- remove `Path` and `PathView`, use `std::filesystem::path` directly
2024-07-03 17:43:55 +05:30
John Ericson
b0bc2a97bf
Put unit tests back in old build system for now
2024-07-02 09:26:22 -04:00
John Ericson
451f8a8c19
Put back files for now
...
We'll revert this sometime later
2024-07-02 09:26:22 -04:00
John Ericson
17a8c2bfce
Unit tests and external libraries
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
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
a409c1a882
Start unit testing GitFileSystemObjectSink
2024-07-01 17:29:07 +02:00
Robert Hensing
992912f3b4
test-support: Add TracingFileSystemObjectSink
2024-07-01 17:29:07 +02:00
siddhantCodes
72bb530141
use CanonPath
in fs-sink
and its derivatives
2024-06-30 19:03:15 +05:30
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
Robert Hensing
85de5a60c7
Use lib instead of explicit fileset passing
2024-06-26 04:11:20 +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
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
1620ad4587
Split out GlobalConfig
into its own header
...
This makes it easier to understand the reach of global variables /
global state in the config system.
2024-06-24 11:36:21 -04:00
John Ericson
b51e161af5
Cleanup ContentAddressMethod
to match docs
...
The old `std::variant` is bad because we aren't adding a new case to
`FileIngestionMethod` so much as we are defining a separate concept ---
store object content addressing rather than file system object content
addressing. As such, it is more correct to just create a fresh
enumeration.
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-06-24 10:24:06 -04:00
John Ericson
64e599ebe1
Rename Recursive
-> NixArchive
...
For enums:
- `FileIngestionMethod`
- `FileSerialisationMethod`
2024-06-24 10:24:06 -04:00
HaeNoe
7fb14201af
Unit test for derivation "advanced attrs"
...
This tests the parser and JSON format using the DRV files from the tests
added in the previous commit.
Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems>
2024-06-23 21:42:56 -04:00
PoweredByPie
8b81d083a7
Remove lookupPathForProgram and implement initial runProgram test
...
Apparently, CreateProcessW already searches path, so manual path search
isn't really necessary.
2024-06-18 01:01:52 -07:00
PoweredByPie
4f6e3b9402
Implement tests for lookupPathForProgram and fix bugs caught by tests
2024-06-17 18:46:08 -07:00
PoweredByPie
d7537f6955
Implement initial spawn tests (just testing windowsEscape for now)
2024-06-17 14:58:17 -07:00
Robert Hensing
2894c1b38e
WIP add testresults output
2024-06-16 16:34:54 +02:00
Robert Hensing
b94e1d6218
C API: Value -> nix_value
...
See issue https://github.com/NixOS/nix/issues/10434
2024-06-13 18:51:58 +02:00
Robert Hensing
0b56c98b1c
C API: Value -> nix_value
2024-06-13 18:18:36 +02:00
John Ericson
7c2981fc55
Fix FreeBSD build
...
This restores some CPP'd code that was added in
c18911602e
and accidentally lost in
2477e4e3b8
.
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2024-06-12 15:59:54 -04:00
John Ericson
1a32490aca
Merge pull request #10835 from hercules-ci/update-nixpkgs-24.05
...
Update to Nixpkgs 24.05
2024-06-05 17:56:16 -04:00
Robert Hensing
27f880c098
Format after clang-format update
2024-06-03 18:38:56 +02:00
Eelco Dolstra
7f5b57d18f
Merge remote-tracking branch 'origin/master' into large-path-warning
2024-06-03 15:32:27 +02:00
Eelco Dolstra
d16fcaee21
Merge pull request #10782 from obsidiansystems/both-connections
...
Factor our connection code for worker proto like serve proto
2024-06-03 15:10:38 +02:00
John Ericson
84c65135a5
ValidPathInfo
JSON format should use null
not omit field
...
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-06-03 08:21:22 -04:00
John Ericson
f71b4da0b3
Factor our connection code for worker proto like serve proto
...
This increases test coverage, and gets the worker protocol ready to be
used by Hydra.
Why don't we just try to use the store interface in Hydra? Well, the
problem is that the store interface works on connection pools, with each
opreation getting potentially a different connection, but the way temp
roots work requires that we keep one logical "transaction" (temp root
session) using the same connection.
The longer-term solution probably is making connections themselves
implement the store interface, but that is something that builds on
this, so I feel OK that this is not churn in the wrong direction.
Fixes #9584
2024-05-27 00:43:46 -04:00