Commit graph

15964 commits

Author SHA1 Message Date
Yuxuan Shui
75a6e6dd0e Add --unpack to nix store prefetch-file 2024-01-19 15:53:45 +00:00
Théophane Hufschmitt
e652322a61
Merge pull request #9799 from obsidiansystems/push-add-to-store-from-dump-unsupported-down
Push `addToStoreFromDump` `unsupported(...)` down `Store` class hierarchy
2024-01-18 16:54:44 +01:00
Eelco Dolstra
32706b14a7
Merge pull request #9798 from edolstra/remote-store-eof
Print a more helpful message if the daemon crashes
2024-01-18 15:47:59 +01:00
Eelco Dolstra
1fe8f54bd3 Use BackedStringView 2024-01-18 15:27:57 +01:00
Théophane Hufschmitt
28674247ec
Merge pull request #9787 from obsidiansystems/bind-proc-syserror
`bind`: give same treatment as `connect` in #8544, dedup
2024-01-18 09:34:15 +01:00
John Ericson
574db83504 Push addToStoreFromDump unsupported(...) down Store class hierarchy
Instead of having it be the default method in `Store` itself, have it be
the implementation in `DummyStore` and `LegacySSHStore`. Then just the
implementations which fail to provide the method pay the "penalty" of
dealing with the icky `unimplemented` function for non-compliance.

Picks up where #8217. Getting close to no `unsupported` in the `Store`
interface itself!

More progress on issue #5729.
2024-01-17 23:46:03 -05:00
John Ericson
3016e67c21 bind: give same treatment as connect in #8544, dedup
It is good to propagate the underlying error so whether or not we use a
process to deal with path length issues is not observable.

Also, as these wrapper functions got more and more complex, the code
duplication got worse and worse. The new `bindConnectProcHelper`
function deduplicates them.
2024-01-17 23:35:08 -05:00
Eelco Dolstra
a3cf27ca47 Print a more helpful message if the daemon crashes
Instead of

   error: unexpected end-of-file

you now get

   error: Nix daemon disconnected unexpectedly (maybe it crashed?)
2024-01-17 22:54:02 +01:00
John Ericson
b5ed36e663
Merge pull request #9797 from edolstra/fix-error-message
Store::buildPaths(): Fix display of store paths
2024-01-17 16:11:21 -05:00
Eelco Dolstra
39ab50f9ee Store::buildPaths(): Fix display of store paths
This was broken in 7ac39ff05c.
2024-01-17 21:41:37 +01:00
Robert Hensing
1d89c7b02e
Merge pull request #9796 from obsidiansystems/cleanup-dep-patches
Move dependency patches from top level into subdir
2024-01-17 20:06:27 +01:00
John Ericson
799f2d0699
Merge pull request #9795 from Ericson2314/flake-fix-indent-eror
Fix indentation error in `flake.nix`
2024-01-17 13:47:15 -05:00
John Ericson
1de8eed28a Move dependency patches from top level into subdir
Good to not clutter the top-level directory.
2024-01-17 13:13:54 -05:00
John Ericson
e938912cff Fix indentation error in flake.nix 2024-01-17 13:08:03 -05:00
Théophane Hufschmitt
2cb9c7c681
Merge pull request #9791 from fricklerhandwerk/typo
fix typo
2024-01-17 09:08:22 +01:00
Valentin Gagarin
55da939424 fix typo 2024-01-17 02:57:11 +01:00
Robert Hensing
2a3c5e6b8b
Merge pull request #9480 from NixOS/libfetchers-git-exportIgnore
libfetchers/git: Support export-ignore
2024-01-16 23:03:46 +01:00
Robert Hensing
01271f2996
Merge pull request #9786 from hercules-ci/package
DerivationInfo -> PackageInfo
2024-01-16 22:43:14 +01:00
Robert Hensing
51f524c629
Merge pull request #9755 from 9999years/printer-followup
Printer followup
2024-01-16 22:35:08 +01:00
John Ericson
799e662cbe
Merge pull request #9279 from tfc/util-improv
Util improvements
2024-01-16 15:05:28 -05:00
Jacek Galowicz
8ae3aeec94 Don't use std::make_unique right before release 2024-01-16 17:00:46 +00:00
Jacek Galowicz
9d9f42cc38 Remove C-style casts 2024-01-16 17:00:46 +00:00
Jacek Galowicz
d11d7849f7 Use ChildWrapperFunction type and make casts more explicit 2024-01-16 17:00:46 +00:00
Jacek Galowicz
c924147c9d Drop parentheses from thunks 2024-01-16 17:00:46 +00:00
Jacek Galowicz
1885d579db Improve String Handling 2024-01-16 17:00:46 +00:00
Jacek Galowicz
0bc66e529f Use npos member variables instead of full type 2024-01-16 15:17:57 +00:00
Eelco Dolstra
7115edc85a
Merge pull request #8544 from edolstra/handle-missing-gc-socket
LocalStore::addTempRoot(): Handle ENOENT
2024-01-16 16:05:58 +01:00
Robert Hensing
ea6aa5ffd8 Package{,Info}: comments 2024-01-16 15:44:02 +01:00
Robert Hensing
85a1cd9bd5
Merge pull request #9762 from hercules-ci/doc-glossary-package
doc/glossary: Define package and package attribute set
2024-01-16 15:34:59 +01:00
Robert Hensing
65255edc9b DerivationInfo -> PackageInfo
This does not yet resolve the coupling between packages and
derivations, but it makes the code more consistent with the
terminology, and it accentuates places where the coupling is
obvious, such as

         auto drvPath = packageInfo.queryDrvPath();
         if (!drvPath)
             throw Error("'%s' is not a derivation", what());

... which isn't wrong, and in my opinion, doesn't even look
wrong, because it just reflects the current logic.
However, I do like that we can now start to see in the code that
this coupling is perhaps a bit arbitrary.
After this rename, we can bring the DerivingPath concept into type
and start to lift this limitation.
2024-01-16 15:28:03 +01:00
Eelco Dolstra
d005bade7f connect(): Propagate errno from the child process
This is necessary on macOS since addTempRoot() relies on errno.
2024-01-16 15:26:17 +01:00
Eelco Dolstra
0b1d93d2ba Sleep a bit between attempts to connect to the root server 2024-01-16 15:26:17 +01:00
Robert Hensing
baea5f42c6
doc/glossary: Simplify software package definition
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-01-16 14:50:53 +01:00
Eelco Dolstra
302625e83b Merge remote-tracking branch 'origin/master' into handle-missing-gc-socket 2024-01-16 13:18:58 +01:00
Eelco Dolstra
86156d05dd
Merge pull request #9785 from hercules-ci/test-substring-negative
tests/functional/lang: Test substring with negative length
2024-01-16 13:08:07 +01:00
Eelco Dolstra
7e072b6b1e
Merge pull request #9781 from NixOS/dependabot/github_actions/cachix/cachix-action-14
Bump cachix/cachix-action from 13 to 14
2024-01-16 13:05:43 +01:00
Eelco Dolstra
df1a931a45
Merge pull request #9780 from NixOS/dependabot/github_actions/cachix/install-nix-action-25
Bump cachix/install-nix-action from 24 to 25
2024-01-16 13:05:19 +01:00
Robert Hensing
cbc319e9be tests/functional/lang: Test substring with negative length 2024-01-16 12:19:31 +01:00
Robert Hensing
b2deff1947
Merge pull request #9747 from awakesecurity/mz/fix-quadratic-splitString
Fix performance of builtins.substring for empty substrings
2024-01-16 12:18:59 +01:00
dependabot[bot]
bf7754c099
Bump cachix/cachix-action from 13 to 14
Bumps [cachix/cachix-action](https://github.com/cachix/cachix-action) from 13 to 14.
- [Release notes](https://github.com/cachix/cachix-action/releases)
- [Commits](https://github.com/cachix/cachix-action/compare/v13...v14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-15 22:35:15 +00:00
dependabot[bot]
e0a7643086
Bump cachix/install-nix-action from 24 to 25
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 24 to 25.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v24...v25)

---
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>
2024-01-15 22:35:12 +00:00
John Ericson
8a2da82220
Merge pull request #9759 from obsidiansystems/abs-path-string-view
`absPath`: just take a `std::string_view`
2024-01-15 10:22:20 -05:00
Robert Hensing
eeaa188973
Merge pull request #9748 from obsidiansystems/no-rapidcheck-headers
Simplify RapidCheck configure
2024-01-15 14:52:14 +01:00
John Ericson
beed00c04e absPath: just take a std::string_view
1. Slightly more efficient

2. Easier to call

Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2024-01-15 08:21:54 -05:00
John Ericson
9b9ecdee34 Simplify RapidCheck configure
No more `RAPIDCHECK_HEADERS`!
2024-01-15 08:05:05 -05:00
John Ericson
dd42a4e3e9 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/86501af7f1d51915e6c335f90f2cab73d7704ef3' (2024-01-11)
  → 'github:NixOS/nixpkgs/a1982c92d8980a0114372973cbdfe0a307f1bdea' (2024-01-12)
2024-01-15 08:04:46 -05:00
Robert Hensing
268c49264a
Merge pull request #9763 from L-as/avoid-unnecessary-copy
Avoid unnecessary copy of goal log
2024-01-15 08:32:03 +01:00
John Ericson
8d4b67912d
Merge pull request #9768 from obsidiansystems/nix-profile-test-no-outlink
`tests/functional/nix-profile.sh`: Add missing `--no-link`
2024-01-14 16:11:42 -05:00
John Ericson
03a6ca9b25 tests/functional/nix-profile.sh: Add missing --no-link
Otherwise we get a stray `tests/functional/result`, which can cause
spurious failures later.

(I got a failure because the test temp dir effecting the store dir
changed. This caused a test later because Nix didn't want to remove the
old `result` because it wasn't pointing inside the new Nix store.)
2024-01-14 15:27:44 -05:00
John Ericson
7ab0a4c39d
Merge pull request #9757 from obsidiansystems/parser-dodge-windows-macros
Avoid Windows macros in the parser and lexer
2024-01-14 13:36:13 -05:00