Jörg Thalheim
3180c09723
Merge pull request #11951 from Mic92/libstore
...
source-accessor: fix case where normalization goes beyond root
2024-11-25 15:46:18 +01:00
Jörg Thalheim
3fb7481e64
source-accessor: fix case where normalization goes beyond root
...
fixes https://github.com/NixOS/nix/issues/11936
2024-11-25 15:11:36 +01:00
Robert Hensing
7e68306a4b
Merge pull request #11950 from NixOS/mergify/roberth/config-update
...
ci(Mergify): configuration update
2024-11-25 12:41:32 +01:00
Robert Hensing
6502dc4d6a
ci(Mergify): configuration update
...
Signed-off-by: Robert Hensing <null>
2024-11-25 12:06:54 +01:00
Robert Hensing
46b0f7755f
Merge pull request #11940 from NixOS/c-api-libflake
...
C API: Add libflake-c
2024-11-25 10:00:56 +01:00
Robert Hensing
6db6b269ed
.github/ci: Set max-jobs to 1, to reduce peak memory usage
2024-11-25 09:22:26 +01:00
Robert Hensing
d004c524b8
test: Change FAIL to throw
...
[FAIL()] is a macro with `return`, making it unsuitable for helpers.
This uses std::runtime_error, because gtest does not seem to provide an
exception type of its own for this purpose. [AssertionException] is for
a different use case.
[FAIL()]: https://google.github.io/googletest/reference/assertions.html#FAIL
[AssertionException]: 35d0c36560/docs/reference/testing.md (assertionexception-assertionexception)
2024-11-24 23:57:24 +01:00
Robert Hensing
4eecf3c20a
Add nix-flake-c, nix_flake_init_global, nix_flake_settings_new
2024-11-24 23:57:24 +01:00
Robert Hensing
f06f611ff3
refactor: Extract unsafe_new_with_self
2024-11-24 23:57:24 +01:00
Robert Hensing
1bd7517801
Doc nix_get_path_string
2024-11-24 23:57:24 +01:00
Robert Hensing
82a23d9b6b
libexpr-c: Add nix_eval_state_builder
2024-11-24 23:57:24 +01:00
Jörg Thalheim
bb1a1fdb60
Merge pull request #11938 from abitrolly/closure-to-tarball
...
Rename install-nix-from-closure.sh into install-nix-from-tarball.sh.in
2024-11-24 23:03:27 +01:00
Anatoli Babenia
4145d18435
Rename install-nix-from-closure.sh into install-nix-from-tarball.sh
...
Because it is only used as /install script from tarball.
2024-11-24 22:29:17 +01:00
John Ericson
66f0132d78
Merge pull request #11942 from xokdvium/dev/make-test-support-headers-self-sufficient
...
build(lib{expr,store,util}-test-support): depend on -c libraries
2024-11-24 11:38:27 -05:00
Sergei Zimmerman
fbffd47fb7
build(lib{expr,store,util}-test-support): depend on -c libraries
...
Since lib{expr,store,util}-test-support subprojects define nix_api_* helpers
for testing nix c bindings, they need to publicly depend on -c counterparts.
This makes their headers self-sufficient and does not rely on the -tests to add
necessary dependencies.
2024-11-24 09:53:10 +00:00
Jörg Thalheim
acb60fc359
Merge pull request #11937 from xokdvium/dev/exterminate-dead-variables
...
chore: get rid of dead code and unused variables where appropriate
2024-11-24 10:50:58 +01:00
Jörg Thalheim
fb6e37b834
Merge pull request #11943 from xokdvium/dev/registry-remove-use-erase
...
refactor(libfetchers/registry): use standard remove_if + erase
2024-11-24 10:43:42 +01:00
Sergei Zimmerman
09ddc34b62
refactor(libfetchers/registry): use standard remove_if + erase
...
Get rid of this fixme. This does not appear to be used anywhere in
the nix codebase itself. Not sure why the comment mentioned C++20 erase
member function with predicate, but iterator-based algorithms are also fine.
2024-11-24 00:19:26 +03:00
Sergei Zimmerman
756758d968
chore: get rid of dead code and unused variables where appropriate
...
Looks like some cruft has been left over from previous refactorings.
This removes dead variables, which should not have side effects in their
constructors. In cases where the variable initialization has a purpose
[[maybe_unused]] is inserted to silence compiler warnings.
2024-11-22 18:05:53 +03:00
tomberek
3e9cc78eb5
Merge pull request #11908 from Mic92/pull-request
...
document shallow clone options in git fetchers
2024-11-22 09:26:11 -05:00
Eelco Dolstra
feb46688a2
Merge pull request #11909 from DeterminateSystems/flakeref
...
Clean up flakeref parsing
2024-11-22 13:18:23 +01:00
Eelco Dolstra
ebb19cc1cd
Drop std::make_pair
...
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2024-11-22 09:14:01 +01:00
Jörg Thalheim
838d3c1ad0
Merge pull request #11933 from DeterminateSystems/no-narHash
...
fetchTree: Don't crash if narHash is missing
2024-11-22 08:07:50 +01:00
John Ericson
09e989fe84
Merge pull request #11934 from DeterminateSystems/fix-optimization
...
Use -O3 again
2024-11-21 23:10:22 -05:00
Vladimir Panteleev
ba074465ba
doc: Clarify that nix-shell still uses shell from host environment ( #8809 )
...
* doc: Clarify that nix-shell still uses shell from host environment
* doc: Fix NIX_BUILD_SHELL description
* doc: Add anchor and link to NIX_BUILD_SHELL
* doc: Add example of default shell trickiness
Co-authored-by: Valentin Gagarin <valentin@gagarin.work>
2024-11-21 20:08:13 +00:00
Eelco Dolstra
ed120a61ab
Use -O3 again
...
This was lost in the switch to the new build system. -O3 provides
around a 10% performance gain compared to -O2, see
e.g. nix-env.qaAggressive.time in
https://hydra.nixos.org/job/nix/master/metrics.nixpkgs#tabs-charts .
2024-11-21 20:34:54 +01:00
Eelco Dolstra
965ca18db8
Merge build-utils-meson/{diagnostics,threads} into build-utils-meson/common
...
This reduces the amount of boilerplate. More importantly, it provides
a place to add compiler flags (such as -O3) without having to add it
to every subproject (and the risk of forgetting to include it).
2024-11-21 20:34:54 +01:00
Eelco Dolstra
f4f4b698f6
fetchTree: Don't crash if narHash is missing
...
Fixes
nix: ../src/libexpr/primops/fetchTree.cc:37: void nix::emitTreeAttrs(EvalState&, const StorePath&, const fetchers::Input&, Value&, bool, bool): Assertion `narHash' failed.
on a lock file with an input that doesn't have a narHash. This can
happen when using a lock file created by the lazy-trees branch.
Cherry-picked from lazy-trees.
2024-11-21 16:53:34 +01:00
Eelco Dolstra
45b0158d91
Merge pull request #11915 from NixOS/bump-fetcher-cache-version
...
Bump fetcher cache version
2024-11-21 16:34:20 +01:00
Jörg Thalheim
fa17927d9d
Merge pull request #11917 from Pandapip1/update-issue-template-consistent-with-nixpkgs
...
Update issue and pull request templates
2024-11-21 10:16:46 +01:00
Eelco Dolstra
b767987942
Merge pull request #11926 from DeterminateSystems/split-flake-tests
...
Break up tests/functional/flakes/flakes.sh
2024-11-20 23:41:09 +01:00
Eelco Dolstra
4a18c78385
flake_regressions: Pass -L to nix build
2024-11-20 23:03:31 +01:00
Eelco Dolstra
e122acef97
Fix VM test
2024-11-20 23:03:31 +01:00
Eelco Dolstra
671df02bf7
shellcheck
2024-11-20 23:03:31 +01:00
John Ericson
82f6fba0d4
Merge pull request #11668 from DeterminateSystems/schema-migrations
...
Support fine-grained database schema migrations
2024-11-20 16:32:36 -05:00
Gavin John
2f24030bff
Move bug report list to comment and make it more nix-specific
2024-11-20 13:23:02 -08:00
Eelco Dolstra
18ab72aa0f
Merge pull request #11657 from DeterminateSystems/nix-copy-gc
...
nix copy: Add --profile and --out-link flags
2024-11-20 21:48:56 +01:00
Eelco Dolstra
db0525692d
Formatting
2024-11-20 21:07:22 +01:00
Eelco Dolstra
d002324f1b
Merge remote-tracking branch 'origin/master' into nix-copy-gc
2024-11-20 21:05:52 +01:00
Eelco Dolstra
6832ee5d6f
Move non-flake input tests into a separate file
2024-11-20 19:51:04 +01:00
Jörg Thalheim
5256aa0f45
Merge pull request #11881 from xokdvium/dev/get-rid-of-nullptr-references-in-eval
...
fix(libexpr/eval-inline): get rid of references to nullptr env
2024-11-20 19:36:57 +01:00
Jörg Thalheim
5883647338
Merge pull request #11924 from DeterminateSystems/remove-callPathFilter-arg
...
EvalState::callPathFilter(): Remove unnecessary pathArg argument
2024-11-20 19:30:11 +01:00
Eelco Dolstra
4cafea7c7b
Add a utility function for creating/registering a simple flake
2024-11-20 18:51:23 +01:00
Eelco Dolstra
e1cb905aca
Move --commit-lock-file-summary tests into a separate file
2024-11-20 18:42:33 +01:00
Eelco Dolstra
fd2df5f02f
Rename nonFlakeDir -> scriptDir
2024-11-20 18:23:20 +01:00
Eelco Dolstra
5533b0c735
Move shebang flake tests into a separate test
2024-11-20 18:08:31 +01:00
Eelco Dolstra
ad7ad017ea
EvalState::callPathFilter(): Remove unnecessary pathArg argument
2024-11-20 16:35:47 +01:00
Jörg Thalheim
c13c6066b7
Merge pull request #11922 from picnoir/pic/catch-gc-exception
...
gc: resume GC after a pathinuse error
2024-11-20 16:31:20 +01:00
John Ericson
a7e1f2d5a3
Merge pull request #11912 from DeterminateSystems/apply-rewrites
...
BasicDerivation: Add applyRewrites() method
2024-11-20 10:12:01 -05:00
Sergei Zimmerman
1800853b2a
fix(libexpr/eval-inline): get rid of references to nullptr env
...
When diagnosing infinite recursion references to nullptr `Env` can be formed.
This happens only with `ExprBlackHole` is evaluated, which always leads to
`InfiniteRecursionError`.
UBSAN log for one such case:
```
../src/libexpr/eval-inline.hh:94:31: runtime error: reference binding to null pointer of type 'Env'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../src/libexpr/eval-inline.hh:94:31 in
```
2024-11-20 17:54:58 +03:00