Commit graph

14032 commits

Author SHA1 Message Date
Yorick 58d24a4cb6 Always disable GC in a coroutine unless the patch is applied 2023-04-07 14:54:38 +02:00
Yorick 00bc34430b DisableGC: replace by CoroutineContext, std::shared_ptr<void> 2023-04-07 14:53:40 +02:00
Yorick 2c53ef1bfe Disable GC inside coroutines on mac OS 2023-04-07 14:52:59 +02:00
Théophane Hufschmitt 81dfc2b012
Merge pull request #7515 from MatthewCroughan/mc/check-trusted-user
Add Store::isTrustedClient()
2023-04-07 13:41:32 +02:00
matthewcroughan 9207f94582 Add Store::isTrustedClient()
This function returns true or false depending on whether the Nix client
is trusted or not. Mostly relevant when speaking to a remote store with
a daemon.

We include this information in `nix ping store` and `nix doctor`

Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems>
2023-04-06 19:59:57 -04:00
Théophane Hufschmitt 9185639631
Document the concept of “experimental feature” (#5930)
Add a page explaining what “experimental features” are, when and how they should be used

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>
2023-04-06 11:25:22 +00:00
Valentin Gagarin bbdb5a58c7
Merge pull request #7849 from milahu/fix-man-nix-shell
docs: fix nix-shell commands
2023-04-05 13:06:59 +02:00
milahu 1ac10808ba docs: fix nix-shell commands 2023-04-05 12:38:36 +02:00
Valentin Gagarin 3586e97e23
Merge pull request #8167 from fricklerhandwerk/doc-nix-database
glossary: Nix database
2023-04-05 11:17:35 +02:00
Mike (stew) O'Connor cab5266092 add a definition of the nix database to the glossary
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-04-05 10:50:34 +02:00
Valentin Gagarin ed5d0c1362 add anchor to 'local store' 2023-04-05 10:48:59 +02:00
Théophane Hufschmitt 1707e7ea5f
Merge pull request #7579 from fricklerhandwerk/review-process
review process: all PRs must be triaged
2023-04-05 01:57:17 +02:00
Valentin Gagarin f912ab89cc only triage non-trivial pull requests
the team perceives triaging literally everything as too much overhead,
and there is a desire to allow for more parallel action.
2023-04-05 01:27:15 +02:00
Théophane Hufschmitt d93c1514eb
Merge pull request #7944 from yorickvP/fix-curRepl
NixRepl::mainLoop: restore old curRepl on function exit
2023-04-04 09:44:47 +02:00
Théophane Hufschmitt 523c3f7225
Merge pull request #8157 from hercules-ci/switch-bugs
Fix current and future `switch` bugs
2023-04-03 20:43:02 +02:00
Eelco Dolstra 81491e1379
Merge pull request #8042 from lheckemann/alt-lockfiles
Allow specifying alternative paths for reading/writing flake locks
2023-04-03 19:28:09 +02:00
Robert Hensing bf2c5c3958 nix-store.cc: Refactor, remove qDefault 2023-04-03 18:45:20 +02:00
Robert Hensing fba7be80eb Enable -Werror=switch-enum
switch statements must now match all enum values or disable the
warning.

Explicit is good. This has helped us find two bugs, after solving
another one by debugging.

From now on, adding to an enum will raise errors where they are
not explicitly handled, which is good for productivity, and helps
us decide the correct behavior in all usages.

Notably still excluded from this though are the cases where the
warning is disabled by local pragmas.

fromTOML.cc did not build despite a top-level pragma, so I've had
to resort to a makefile solution for that.
2023-04-03 18:45:20 +02:00
Robert Hensing 9470ee877d Allow open switch-enum in 5 places 2023-04-03 18:45:20 +02:00
John Ericson acc3314376
Merge pull request #7611 from obsidiansystems/structured-command-stabilization
Stuctured command stability
2023-04-03 12:22:10 -04:00
Robert Hensing 3dac4c7874 Add explicit case statements where -Wswitch-enum would report them 2023-04-03 18:17:32 +02:00
Robert Hensing ed7885017c Fix systemd logging for lvlNotice: eqv to lvlInfo, not lvlVomit 2023-04-03 18:17:32 +02:00
Robert Hensing 62cacc371f Fix BuildResult.toString() for NoSubstituters 2023-04-03 18:17:30 +02:00
John Ericson 4a0b893d5e Stuctured command stability
Prior to this, there was an ad-hoc whitelist in `main.cc`. Now, every
command states its stability.

In a future PR, we will adjust the manual to take advantage of this new
information in the JSON.
(It will be easier to do that once we have some experimental feature
docs to link too; see #5930 and #7798.)
2023-04-03 11:48:21 -04:00
Robert Hensing f3a6de6ba9
Merge pull request #8148 from hercules-ci/fix-issue-8119-printValue-tBlackhole-abort
eval: Fix crash on missing printValue tBlackhole case
2023-04-03 16:05:55 +02:00
Eelco Dolstra ac4318a1b9
Merge pull request #8152 from obsidiansystems/move-querySubstitutablePathInfos
Move `querySubstitutablePathInfos` from `LocalStore` to `Store`
2023-04-03 15:36:33 +02:00
Robert Hensing 1c55544a42 eval: Fix crash on missing printValue tBlackhole case
Fixes #8119
2023-04-03 15:32:42 +02:00
Théophane Hufschmitt 70bb7b7289
Merge pull request #7610 from obsidiansystems/gate-default-settings
Punt on improper global flags for now
2023-04-03 14:02:45 +02:00
Théophane Hufschmitt a06ea8db77
Merge pull request #8039 from obsidiansystems/prioritize-testing
Prioritize testing in the maintainers process docs
2023-04-03 13:46:31 +02:00
Eelco Dolstra 5256ba6d87
Merge pull request #8151 from obsidiansystems/internal-api-docs-pr-template
Mention internal API docs in PR template
2023-04-03 10:49:48 +02:00
John Ericson 9383520b75 Move querySubstitutablePathInfos from LocalStore to Store
The code is not local-store-specific, so we should share it with all
stores. More uniform behavior is better, and a less store-specific
functionality is more maintainable.

This fixes a FIXME added in f73d911628 by @edolstra himself.
2023-04-02 20:32:01 -04:00
John Ericson ca3937fb82 Mention internal API docs in PR template
I think we want to ensure that all new items in headers are documented,
and the documentation on modified items is kept up to date.

It will take a while to document the backlog of undocumented things, but
we can at least ensure that new items don't extend that backlog.
2023-04-02 19:44:44 -04:00
John Ericson 2ef99cd104
Merge pull request #8122 from bjornfor/use-nix-store-l-unless-experimental-enabled
Don't recommend 'nix log' unless experimental feature is enabled
2023-04-01 14:50:16 -04:00
John Ericson ea1cbc3df5
Merge pull request #8133 from obsidiansystems/improve-internal-api-docs
Extend internal API docs, part 2
2023-04-01 12:42:03 -04:00
John Ericson f4ab297b31 Ensure all headers have #pragma once and are in API docs
`///@file` makes them show up in the internal API dos. A tiny few were
missing `#pragma once`.
2023-03-31 23:19:44 -04:00
John Ericson abd5e7dec0 Extend internal API docs, part 2
Picking up from #8111.

Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2023-03-31 23:01:40 -04:00
John Ericson 8ae9d66940
Merge pull request #8142 from patricksjackson/atomic-sync
Replace unnecessary Sync<uint64_t> with std::atomic<uint64_t>
2023-03-31 21:49:20 -04:00
Patrick Jackson 2b905d1d35 Replace unnecessary Sync<uint64_t> with std::atomic<uint64_t> 2023-03-31 17:56:25 -07:00
Eelco Dolstra cf76b38e27
Merge pull request #8137 from edolstra/lazy-trees-cherrypicks
Add CanonPath::makeRelative()
2023-03-31 18:26:08 +02:00
Eelco Dolstra 936e7c66eb Indentation 2023-03-31 17:15:03 +02:00
Eelco Dolstra 7ebaf0252a Add CanonPath::makeRelative() 2023-03-31 17:15:03 +02:00
Eelco Dolstra 1829e7ccac
Merge pull request #8139 from edolstra/no-nixpkgsFor-output
Remove nixpkgsFor flake output
2023-03-31 17:09:36 +02:00
Eelco Dolstra 49da2e8b0c
Merge pull request #8138 from tweag/fix-installer-vm-tests
Fix the installer VM tests
2023-03-31 16:59:24 +02:00
Eelco Dolstra 2425121a59 Remove nixpkgsFor flake output
Fixes "warning: unknown flake output 'nixpkgsFor'".
2023-03-31 16:08:16 +02:00
Théophane Hufschmitt 3f362f1c07 test: Make the installer work on old rhel versions
`scp -r` doesn't seem to behave properly there, so tarpipe ftw!
2023-03-31 15:29:50 +02:00
Théophane Hufschmitt 4e7a78ca97 test: Don't add a channel for the force-no-daemon installer variant
Was probably an overlook of when the tests were first added, but that
now messes-up with the `nix-channel --update` that happens down the line
(and can't access the network since we're inside a Nix build)
2023-03-31 15:27:02 +02:00
Théophane Hufschmitt bb6e1244a3
Merge pull request #7406 from amesgen/gitlab-fetcher
Document `gitlab` input scheme
2023-03-31 13:21:55 +02:00
Théophane Hufschmitt e32ca3cf16
Merge pull request #8018 from tweag/ssh-password-prompt
SSH: don't erase password prompt if it is displayed
2023-03-31 12:06:10 +02:00
Théophane Hufschmitt 623115fc0f
Merge pull request #8135 from patricksjackson/copyPaths-datarace
Fix data race in copyPaths
2023-03-31 07:19:20 +02:00
Patrick Jackson 804180ad52 Only lock once 2023-03-30 18:06:27 -07:00