Robert Hensing
146953502b
tests/functional/dependencies.nix: Check that we tolerate syntax and type errors
2024-11-20 11:27:38 +01:00
Linus Heckemann
41333335d3
libutil: handle json builder log messages with unexpected format
...
Before this change, expressions like:
with import <nixpkgs> {};
runCommand "foo" {} ''
echo '@nix {}' >&$NIX_LOG_FD
''
would result in Lix crashing, because accessing nonexistent fields of
a JSON object throws an exception.
Rather than handling each field individually, we just catch JSON
exceptions wholesale. Since these log messages are an unusual
circumstance, log a warning when this happens.
Fixes #544 .
Change-Id: Idc2d8acf6e37046b3ec212f42e29269163dca893
(cherry picked from commit e55cd3beea710db727fd966f265a1b715b7285f3)
2024-11-20 11:06:53 +01:00
Robert Hensing
b9832ad4af
tests/functional/dependencies.nix: Refactor, replace arcane let
2024-11-20 11:05:55 +01:00
Robert Hensing
32becc87fe
Merge pull request #11914 from roberth/evalstate-get-builtins
...
EvalState::getBuiltins
2024-11-19 19:33:37 +01:00
Robert Hensing
ce6b5de78c
Merge pull request #11913 from DeterminateSystems/source-path-in-lookup-path
...
resolveLookupPathPath(): Return a SourcePath instead of a string
2024-11-19 19:23:29 +01:00
Robert Hensing
8637f3de78
Merge pull request #11910 from DeterminateSystems/flake-init
...
nix flake init: Operate on a SourcePath
2024-11-19 19:12:10 +01:00
Robert Hensing
5c258d7e25
refactor: Use EvalState::getBuiltins()
2024-11-19 18:45:53 +01:00
Robert Hensing
8a36d2d8a7
Add EvalState::getBuiltins
2024-11-19 18:23:05 +01:00
Eelco Dolstra
370dfcbeba
Merge pull request #11911 from DeterminateSystems/trivial
...
Trivial changes from lazy-trees
2024-11-19 18:16:11 +01:00
Eelco Dolstra
af07f33d37
resolveLookupPathPath(): Return a SourcePath instead of a string
...
Cherry-picked from lazy-trees.
2024-11-19 18:03:31 +01:00
Robert Hensing
a58e38dab7
Make EvalState::getBuiltin safe for missing attr
2024-11-19 17:30:58 +01:00
Eelco Dolstra
f1b4f14055
Trivial changes from lazy-trees
2024-11-19 17:30:38 +01:00
Eelco Dolstra
868b4d37ea
nix flake init: Operate on a SourcePath
...
Cherry-picked from lazy-trees.
2024-11-19 16:59:38 +01:00
Valentin Gagarin
3b76d01f3b
Merge pull request #11907 from Mic92/pull-request
...
docs/flake: document how to build a pull request
2024-11-19 12:08:33 +01:00
Jörg Thalheim
e224a35a77
docs/flake: document how to build a pull request
...
It's not so common knowledge that forges also expose pull requests as
git refs. But it's actually a cool way of quickly testing someones
contribution, so I found it worth specifically mentioning it.
2024-11-19 11:25:33 +01:00
Robert Hensing
6b0aceedc5
Merge pull request #11902 from roberth/fix-issue-11892
...
Fix issue #11892
2024-11-18 22:20:01 +01:00
Robert Hensing
c4b95dbdd1
Fix issue 11892
...
It seems that I copied the expression for baseDir thoughtlessly and
did not come back to it.
- `baseDir` was only used in the `fromArgs` branch.
- `fromArgs` is true when `packages` is true.
2024-11-18 21:04:04 +01:00
Eelco Dolstra
0498e2259a
Merge pull request #11901 from DeterminateSystems/fix-nix-develop-test
...
tests/functional/flakes/develop.sh: Don't hang
2024-11-18 18:57:14 +01:00
Robert Hensing
61d075840f
Merge pull request #11866 from DeterminateSystems/callFunction-span
...
callFunction: Use std::span
2024-11-18 18:37:12 +01:00
Eelco Dolstra
d8a80e13b8
Merge pull request #11899 from NixOS/meson-print-errorlogs
...
Add --print-errorlogs to mesonCheckFlags
2024-11-18 16:32:11 +01:00
Eelco Dolstra
428af8c66f
tests/functional/flakes/develop.sh: Don't hang
...
The bash shell started by `nix develop` waited forever for stdin
input.
Fixes #11827 .
2024-11-18 16:28:12 +01:00
Robert Hensing
d65fac0fc4
Add --print-errorlogs to mesonCheckFlags
...
This prints the error logs in the tests, including when they're run
with `checkPhase` in the dev shell.
2024-11-18 15:08:32 +01:00
Robert Hensing
d8d59298e5
Merge pull request #9854 from the-sun-will-rise-tomorrow/docker-user
...
docker: Allow building for non-root user
2024-11-18 14:55:51 +01:00
Valentin Gagarin
4387c5ae80
Merge pull request #11894 from myclevorname/nixfmt
...
doc/nix fmt: Mention nixfmt-rfc-style instead of nixfmt(-classic)
2024-11-18 09:06:08 +01:00
John Ericson
68e15beedd
Merge pull request #11844 from roberth/papercut-nix-log
...
Make nix log command easy to copy
2024-11-17 19:06:16 -05:00
myclevorname
3f6855c31b
doc/nix fmt: Mention nixfmt-rfc-style instead of nixfmt(-classic)
2024-11-17 14:12:27 -05:00
Eelco Dolstra
b4790366a0
Merge pull request #11884 from DeterminateSystems/nix-path-info-cout
...
nix path-info: Don't write to std::cout directly
2024-11-15 15:07:24 +01:00
Robert Hensing
c9433c0d18
.github/ci: Push docker only when test succeeds
2024-11-15 12:05:41 +01:00
Robert Hensing
2f3764acbb
.github/ci: Add nix-docker test
...
We still have room to spare in vm_tests, as it's quicker than `nix flake check`
2024-11-15 12:05:41 +01:00
Eelco Dolstra
3e4a83f53b
Use range-based for
2024-11-14 16:12:14 +01:00
Eelco Dolstra
33a0fa882f
nix path-info: Don't write to std::cout directly
...
This interferes with the progress bar, resulting in output like
evaluating derivation 'git+file:///home/eelco/Dev/nix-master#packages.x86_64-linux.default'/nix/store/zz8v96j5md952x0mxfix12xqnvq5qv5x-nix-2.26.0pre20241114_a95f6ea.drv
2024-11-14 15:40:33 +01:00
Valentin Gagarin
a95f6ea5c6
Merge pull request #11882 from dbdr/patch-1
...
Fix typo in nix-collect-garbage.md
2024-11-14 12:09:06 +01:00
dbdr
e53e0a04f4
Fix typo in nix-collect-garbage.md
2024-11-14 09:16:00 +01:00
Jörg Thalheim
cb7c7af95d
Merge pull request #11853 from xokdvium/dev/fix-verbosity-overflow-and-make-verbosity-strong-type
...
fix(libmain/common-args): do not exceed maximum allowed verbosity
2024-11-14 00:52:41 +01:00
Sergei Zimmerman
b9f8c4af40
fix(libmain/common-args): do not exceed maximum allowed verbosity
...
This patch gets rid of UB when verbosity exceeds the maximum logging value of `lvlVomit = 7` and
reaches invalid values (e.g. 8). This is actually triggered in functional tests.
There are too many occurrences to list, but here's one from the UBSAN log:
../src/libstore/gc.cc:610:5: runtime error: load of value 8, which is not a valid value for type 'Verbosity'
2024-11-14 02:07:03 +03:00
John Ericson
03dc3c5769
Merge pull request #11869 from NixOS/unbloat-nix-everything
...
nix-everything: Remove libs, add dev and devdoc package outputs
2024-11-13 16:15:14 -05:00
John Ericson
7ebeceaf3d
Merge pull request #11860 from DeterminateSystems/fix-doxygen-warnings
...
Fix most Doxygen warnings
2024-11-13 16:09:37 -05:00
John Ericson
be2520551e
Merge pull request #11870 from DeterminateSystems/default-phases
...
Make the default stdenv phases do the right thing
2024-11-13 16:04:22 -05:00
John Ericson
2d153bd59b
Merge pull request #11868 from DeterminateSystems/no-api-docs-in-devshell
...
Don't build the API docs in the devshell
2024-11-13 15:56:29 -05:00
Eelco Dolstra
2d2b9cd45d
Merge pull request #11876 from jackwilsdon/osc8
...
Filter OSC 8 correctly
2024-11-13 18:27:27 +01:00
Eelco Dolstra
d85d914bad
Merge pull request #11878 from roberth/accept-removal-of-installables-implicit-outputs
...
Remove warning that interpretation of .drv has changed
2024-11-13 17:11:07 +01:00
Robert Hensing
f534a7a524
Remove warning that interpretation of .drv has changed
...
This was first tagged as 2.15.0, 1½ years ago; plenty of time for
everyone to catch up.
By now, the warning is causing more confusion than that it is helpful,
because passing a `.drv` or `drvPath` has legitimate use cases.
2024-11-13 16:32:21 +01:00
Jack Wilsdon
1301f8434d
Filter OSC 8 correctly
...
This allows Nix to use lowdown 1.2.0 which outputs OSC-8 links.
2024-11-13 00:49:46 +00:00
Eelco Dolstra
37f4c71d1c
Don't change nix::fs for now
2024-11-12 21:10:01 +01:00
Eelco Dolstra
e6aae64318
Make the default stdenv phases do the right thing
...
Fixes #11858 .
2024-11-12 20:42:53 +01:00
Eelco Dolstra
850ccb72cc
Don't build the API docs in the devshell
...
The API docs build is extremely noisy (#11841 ) and probably not many
people care about it anyway. Also, they get rebuild on *every* ninja
invocation which is generally a waste of time.
Of course, you can still build the docs via `nix build
.#nix-{internal,external}-api-docs`, which is pretty fast.
2024-11-12 20:18:33 +01:00
Robert Hensing
f312a7cfff
nix-everything: Make doc a separate package output
2024-11-12 20:11:50 +01:00
Robert Hensing
d4cec7511d
nix-everything: Remove libs, add dev and devdoc package outputs
...
The new package output attributes are somewhat experimental, and
provided for compatibility most of all.
We'll see how well this goes before the changes proposed in
https://github.com/NixOS/nix/issues/6507
2024-11-12 20:05:48 +01:00
Eelco Dolstra
a2e4a4c238
callFunction: Use std::span
...
This is a bit safer than having a separate nrArgs argument.
2024-11-12 19:26:39 +01:00
Robert Hensing
14edb78d53
Merge pull request #11863 from DeterminateSystems/restore-nix-package
...
Provide a "nix" package again
2024-11-12 18:26:30 +01:00