Commit Graph
19011 Commits
Author SHA1 Message Date
John EricsonandGitHub 208c855124 Merge pull request #7896 from obsidiansystems/doxygen
Generate API docs with Doxygen
2023-03-10 13:17:43 -05:00
John EricsonandRobert Hensing 6910f5dcb6 Generate API docs with Doxygen
The motivation is as stated in issue #7814: even though the the C++ API
is internal and unstable, people still want it to be well documented for
sake of learning, code review, and other purposes that aren't predicated
on it being stable.

Fixes #7814

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-03-10 12:51:06 -05:00
Valentin GagarinandGitHub 66f49864f3 Merge pull request #7928 from serokell/doc-includes
Documentation: process `#include` directives
2023-03-10 17:06:42 +01:00
Théophane HufschmittandGitHub 99af56cd0d Merge pull request #8015 from tweag/progress-during-nix-copy
Display progress when running copyPaths (nix copy)
2023-03-10 16:23:22 +01:00
Jörg ThalheimandGitHub 96d0086d2f Merge pull request #188 from nix-community/joerg-ci
bump version
2023-03-10 08:13:15 +00:00
Jörg Thalheim 4983b15121 bump version 2023-03-10 09:09:44 +01:00
Jörg Thalheim 5a7dc07ad1 bump version 2023-03-10 09:08:07 +01:00
bors[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1c9492d4b6 Merge #184
184: build(deps): bump cachix/install-nix-action from 19 to 20 r=Mic92 a=dependabot[bot]



Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-09 21:29:24 +00:00
bors[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Jörg Thalheim
9527cd3b82 Merge #185 #187
185: build(deps): bump DeterminateSystems/update-flake-lock from 16 to 17 r=Mic92 a=dependabot[bot]



187: fix build with nix 2.14 r=Mic92 a=Mic92



Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-03-09 21:22:29 +00:00
Jörg Thalheim 54a9b26431 fix build with nix 2.14 2023-03-09 22:21:59 +01:00
Jörg Thalheim 94b3a3a43d update nix version 2023-03-09 21:01:15 +01:00
Jörg Thalheim 2f518e70ec flake.lock: Update
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/dc531e3a9ce757041e1afaff8ee932725ca60002' (2023-03-01)
  → 'github:hercules-ci/flake-parts/c13d60b89adea3dc20704c045ec4d50dd964d447' (2023-03-09)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/75c8abce0657f9981be937f2bc7b88125d98c03f' (2023-03-09)
  → 'github:NixOS/nixpkgs/8d8f5ede919dc60a86ac37311a63092411c72e90' (2023-03-09)
2023-03-09 20:57:30 +01:00
Eelco DolstraandGitHub 523913d091 Merge pull request #8020 from edolstra/no-such-process
Make findRuntimeRoots() more resilient to disappearing processes
2023-03-09 19:57:47 +01:00
Eelco Dolstra 4f3a4b732c Make findRuntimeRoots() more resilient to disappearing processes
I saw this random failure in https://hydra.nixos.org/build/211811692:

  error: opening /proc/15307/fd: No such process

while running nix-collect-garbage in a readfile-context.sh. This is
because we're not handling ESRCH errors reading /proc/<pid>/fd. So
just move the read inside the try/catch where we do handle it.
2023-03-09 16:44:51 +01:00
Eelco DolstraandGitHub c44750982d Merge pull request #8019 from edolstra/fix-read-from-stdin
Fix another uninitialized variable
2023-03-09 16:04:32 +01:00
Eelco Dolstra 8f96720b9f Fix another uninitialized variable
https://hydra.nixos.org/build/211811494
2023-03-09 15:30:53 +01:00
Alexander Bantyev 4bef2016a1 Display progress when running copyPaths (nix copy)
`nix copy` operations did not show progress. This is quite confusing.

Add a `progressSink` which displays the progress during `copyPaths`,
pretty much copied from `copyStorePath`.

Fixes https://github.com/NixOS/nix/issues/8000
2023-03-09 16:03:48 +04:00
Eelco DolstraandGitHub 1ba40e959b Merge pull request #8012 from NixOS/revert-7725-check-coro-gc
Revert "Disable GC during coroutine execution + test"
2023-03-09 12:37:38 +01:00
mergify[bot]andGitHub 93ff38217d Merge pull request #186 from nix-community/update_flake_lock_action
flake.lock: Update
2023-03-09 01:30:00 +00:00
github-actions[bot] 9fe7efbd10 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/d154f809e9c3c47fee72186aa3ff6479403435d4' (2023-03-06)
  → 'github:NixOS/nixpkgs/75c8abce0657f9981be937f2bc7b88125d98c03f' (2023-03-09)
2023-03-09 01:25:46 +00:00
Théophane HufschmittandGitHub d25322e7c0 Merge pull request #5754 from obsidiansystems/harden-tests-set-u
Harden tests' bash
2023-03-08 21:25:30 +01:00
Théophane HufschmittandGitHub 39700c5cbe Revert "Disable GC during coroutine execution + test" 2023-03-08 20:47:52 +01:00
Eelco DolstraandGitHub e8415dc439 Merge pull request #8005 from edolstra/run-installcheck
Run 'make installcheck' again
2023-03-08 17:40:12 +01:00
John EricsonandRobert Hensing c11836126b Harden tests' bash
Use `set -u` and `set -o pipefail` to catch accidental mistakes and
failures more strongly.

 - `set -u` catches the use of undefined variables
 - `set -o pipefail` catches failures (like `set -e`) earlier in the
   pipeline.

This makes the tests a bit more robust. It is nice to read code not
worrying about these spurious success paths (via uncaught) errors
undermining the tests. Indeed, I caught some bugs doing this.

There are a few tests where we run a command that should fail, and then
search its output to make sure the failure message is one that we
expect. Before, since the `grep` was the last command in the pipeline
the exit code of those failing programs was silently ignored. Now with
`set -o pipefail` it won't be, and we have to do something so the
expected failure doesn't accidentally fail the test.

To do that we use `expect` and a new `expectStderr` to check for the
exact failing exit code. See the comments on each for why.

`grep -q` is replaced with `grepQuiet`, see the comments on that
function for why.

`grep -v` when we just want the exit code is replaced with `grepInverse,
see the comments on that function for why.

`grep -q -v` together is, surprise surprise, replaced with
`grepQuietInverse`, which is both combined.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-03-08 10:26:30 -05:00
Eelco Dolstra 693b1be81f Run 'make installcheck' again
This was failing because the check for the existence of the
'installcheck' target failed silently, so the whole phase got
skipped. It works by running 'make -n installcheck 2> /dev/null',
which however barfs with

  /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld.gold: error: cannot open tests/plugins/plugintest.o: No such file or directory

Fixes #8004.
2023-03-08 14:48:29 +01:00
Eelco DolstraandGitHub 0159dfad3f Merge pull request #8007 from edolstra/fix-coverage
Fix coverage job
2023-03-08 14:45:13 +01:00
Eelco DolstraandGitHub 1bb81286d1 Merge pull request #8006 from edolstra/fix-read-from-stdin
Fix uninitialized readFromStdIn variable
2023-03-08 14:29:27 +01:00
Eelco Dolstra bda8d7f165 Fix coverage job
https://hydra.nixos.org/build/211747539
2023-03-08 14:20:10 +01:00
Eelco Dolstra 1607ad5076 Fix uninitialized readFromStdIn variable
This was causing random failures in tests/ca/substitute.ca: 'nix copy
--file ./content-addressed.nix' wouldn't get the default installable
'.' applied in InstallablesCommand::load(), so it would do nothing.
2023-03-08 13:53:20 +01:00
Eelco DolstraandGitHub df48040786 Merge pull request #7994 from edolstra/fix-ca-crash
Fix crash/hang with CA derivations
2023-03-08 12:15:55 +01:00
Eelco DolstraandGitHub 6b243ef2d5 Merge pull request #7993 from tweag/fix-profile-gc
Fix `nix-collect-garbage -d` with the new profile location
2023-03-08 11:10:45 +01:00
Eelco Dolstra 7bfed34367 Fix crash/hang with CA derivations
The curl download can outlive DrvOutputSubstitutionGoal (if some other
error occurs), so at shutdown setting the promise to an exception will
fail because 'this' is no longer valid in the callback. This can
manifest itself as a segfault, "corrupted double-linked list" or hang.
2023-03-08 11:09:15 +01:00
Théophane HufschmittandGitHub 4a6244dcf7 Merge pull request #7725 from yorickvP/check-coro-gc
Disable GC during coroutine execution + test
2023-03-08 09:51:46 +01:00
Théophane Hufschmitt 2272bc6049 Fix nix-collect-garbage -d with the new profile location
Low-hanging fix for https://github.com/NixOS/nix/pull/5226#issuecomment-1454669399
2023-03-07 13:08:04 +01:00
Théophane HufschmittandGitHub ba0486f045 Merge pull request #7889 from sidkshatriya/sorted-fetch-paths
Print the store paths to be fetched sorted by StorePath name()
2023-03-07 11:58:10 +01:00
dependabot[bot]andGitHub d66f3aaa14 build(deps): bump DeterminateSystems/update-flake-lock from 16 to 17
Bumps [DeterminateSystems/update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) from 16 to 17.
- [Release notes](https://github.com/DeterminateSystems/update-flake-lock/releases)
- [Commits](https://github.com/DeterminateSystems/update-flake-lock/compare/v16...v17)

---
updated-dependencies:
- dependency-name: DeterminateSystems/update-flake-lock
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-06 23:57:54 +00:00
dependabot[bot]andGitHub 2168237dea build(deps): bump cachix/install-nix-action from 19 to 20
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 19 to 20.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v19...v20)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-06 23:57:46 +00:00
Edwin Mackenzie-Owen 934431d06c add flake-compat to flake.nix and use sha256 in default.nix 2023-03-06 21:11:24 +01:00
mupdt 762cf7f214 no-op refactor: extract outLink generation into a function 2023-03-06 10:20:21 -05:00
Eelco DolstraandGitHub 02bf521968 Merge pull request #7580 from fricklerhandwerk/nix-team-add-john
add @Ericson2314 to the Nix team
2023-03-06 15:02:07 +01:00
Eelco DolstraandGitHub fc76852b66 Merge pull request #7957 from NixOS/update-cachix-install-nix
Switch to cachix/install-nix-action@v20
2023-03-06 11:09:39 +01:00
Eelco DolstraandGitHub 3f4dc61f7f Merge pull request #7958 from amesgen/issue-7955
InstallableFlake: Apply nix config in `getCursors`
2023-03-06 11:08:51 +01:00
Eelco DolstraandGitHub 92771ca1be Merge pull request #7975 from fricklerhandwerk/fix-fetchgit
remove indentation in `fetchGit` attribute listing
2023-03-06 11:00:40 +01:00
Théophane HufschmittandGitHub 2fbb2562c1 Merge pull request #7376 from fricklerhandwerk/installable
clarify definition of "installable"
2023-03-06 10:44:14 +01:00
Valentin Gagarin dfeb83cac1 output paths of store derivations are now addressed explicitly 2023-03-06 03:32:14 +01:00
mergify[bot]andGitHub bb8eecb41a Merge pull request #183 from nix-community/update_flake_lock_action
flake.lock: Update
2023-03-06 01:30:51 +00:00
github-actions[bot] f658392ffc flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/00ebdb7b9cf257fc26bdc49749d1204ef3667ddc' (2023-03-02)
  → 'github:NixOS/nixpkgs/d154f809e9c3c47fee72186aa3ff6479403435d4' (2023-03-06)
2023-03-06 01:21:47 +00:00
Valentin Gagarin f69d453c3e remove indentation in fetchGit attribute listing
also reword a confusing sentence and add links to Git terminology
2023-03-05 04:44:11 +01:00
Valentin GagarinandAdam Joseph 2af9fd20c6 clarify definition of "installable"
the term was hard to discover, as its definition and explanation were in
a very long document lacking an overview section.
search did not help because it occurs so often.

- clarify wording in the definition
- add an overview of installable types
- add "installable" to glossary
- link to definition from occurrences of the term
- be more precise about where store derivation outputs are processed
- installable Nix expressions must evaluate to a derivation

Co-authored-by: Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com>
2023-03-05 01:46:17 +01:00
Valentin Gagarin 1e87d5f1ea make descriptions of each installable type an own subsection
this is easier to edit, provides anchors for free, and renders correctly
on the terminal without additional effort.
2023-03-05 01:46:17 +01:00