regnat
313bbc07a8
Implement operator<<
for Suggestions
...
That way there’s no need to explicitely convert it to a string when
printing it
2022-03-07 10:09:10 +01:00
regnat
fd45d85b41
Move OrSuggestions to its own header
...
Prevents a recursive inclusion
2022-03-07 10:09:10 +01:00
regnat
98e361ad4c
Also display suggestions for the commands using the eval cache
...
Make `nix build .#nix-armv8l-linux` work for example
2022-03-07 10:09:10 +01:00
regnat
2405bbbb5e
Add some tests for the suggestions
2022-03-07 10:09:10 +01:00
regnat
c0792b1546
Implement a suggestions mechanism
...
Each `Error` class now includes a set of suggestions, and these are printed by
the top-level handler.
2022-03-07 10:09:09 +01:00
John Ericson
6636202356
Factor out a GcStore
interface
...
Starts progress on #5729 .
The idea is that we should not have these default methods throwing
"unimplemented". This is a small step in that direction.
I kept `addTempRoot` because it is a no-op, rather than failure. Also,
as a practical matter, it is called all over the place, while doing
other tasks, so the downcasting would be annoying.
Maybe in the future I could move the "real" `addTempRoot` to `GcStore`,
and the existing usecases use a `tryAddTempRoot` wrapper to downcast or
do nothing, but I wasn't sure whether that was a good idea so with a
bias to less churn I didn't do it yet.
2022-03-03 19:01:25 +00:00
Eelco Dolstra
e9c04c3351
Be more aggressive in hiding repeated values
...
We now memoize on Bindings / list element vectors rather than Values,
so that e.g. two Values that point to the same Bindings will be
printed only once.
2022-03-03 13:33:34 +01:00
Eelco Dolstra
ecff9d969a
printValue(): Don't show repeated values
...
Fixes #6157 .
2022-03-03 13:18:23 +01:00
Eelco Dolstra
6097790863
Fix segfault in headerCallback()
...
https://hydra.nixos.org/build/168594664
2022-03-03 11:11:16 +01:00
Eelco Dolstra
a7c835e9cb
Use C++11-style initializer
...
Co-authored-by: John Ericson <git@JohnEricson.me>
2022-03-03 10:02:11 +01:00
Eelco Dolstra
b55d79728c
Add EvalState::coerceToStorePath() helper
...
This is useful whenever we want to evaluate something to a store path
(e.g. in get-drvs.cc).
Extracted from the lazy-trees branch (where we can require that a
store path must come from a store source tree accessor).
2022-03-02 23:58:58 +01:00
Eelco Dolstra
161f798aa1
nix profile: Support CA derivations
2022-03-02 20:38:51 +01:00
Eelco Dolstra
54888b92de
Move installables-related operations
2022-03-02 19:19:51 +01:00
Eelco Dolstra
b39ef07414
Style
2022-03-02 11:46:15 +01:00
Eelco Dolstra
010ffc31f8
Remove stray debug line
2022-03-02 11:20:32 +01:00
Eelco Dolstra
03df331c3f
Merge pull request #6189 from obsidiansystems/build-result-header
...
Move `BuildResult` defintion to its own header
2022-03-02 08:47:51 +01:00
Anders Kaseorg
b5cd3e2d5c
filterANSIEscapes: Ignore BEL character
...
GCC is not as good at music as it seems to think it is. Fixes #4546 .
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2022-03-01 15:35:42 -08:00
John Ericson
e862833ec6
Move BuildResult
defintion to its own header
...
Just like we did for `ValidPathInfo` in
d92d4f85a5
.
2022-03-01 19:43:07 +00:00
Eelco Dolstra
0cb5af5000
Merge pull request #6185 from hercules-ci/fetchTree-reuse-local-paths
...
fetchTree: Use isValidPath, add comment
2022-03-01 13:15:42 +01:00
Robert Hensing
b6deca7c0d
fetchTree: Use isValidPath, add comment
2022-03-01 12:11:10 +01:00
Eelco Dolstra
d974d2ad59
fetch{url,Tarball}: Remove 'narHash' attribute
...
This was introduced in #6174 . However fetch{url,Tarball} are legacy
and we shouldn't have an undocumented attribute that does the same
thing as one that already exists ('sha256').
2022-03-01 11:30:26 +01:00
Eelco Dolstra
9ab81a9d38
Merge pull request #6183 from obsidiansystems/sort-config
...
Move some stuff from `Settings` to a new `FetchSettings`.
2022-03-01 10:52:55 +01:00
John Ericson
ea71da395f
Move some stuff from Settings
to a new FetchSettings
.
...
Starting work on #5638
The exact boundary between `FetchSettings` and `EvalSettings` is not
clear to me, but that's fine. First lets clean out `libstore`, and then
worry about what, if anything, should be the separation between those
two.
2022-03-01 01:39:25 +00:00
Robert Hensing
ee019d0afc
Add EvalState::allowAndSetStorePathString helper
...
This switches addPath from `printStorePath` to `toRealPath`.
2022-02-28 21:37:49 +01:00
Robert Hensing
158280d8e9
fetchTree: Do not re-fetch paths already present
2022-02-28 21:37:49 +01:00
Eelco Dolstra
b91500a14e
Fix clang warning
2022-02-28 15:48:26 +01:00
Eelco Dolstra
a949673a5b
Fix Darwin build
...
Fixes #6169
2022-02-28 15:48:26 +01:00
Théophane Hufschmitt
c2720797d5
Merge pull request #6072 from Ma27/fix-nix-why-depends-non-precise
...
nix/why-depends: fix output when not using `--precise`
2022-02-28 11:46:50 +01:00
Eelco Dolstra
df552ff53e
Remove std::string alias (for real this time)
...
Also use std::string_view in a few more places.
2022-02-25 16:13:02 +01:00
Eelco Dolstra
14b38d0887
xml-writer: Remove std aliases
2022-02-25 16:13:02 +01:00
Kevin Amado
b312d4d096
refactor: remove verbose-build from docs
...
- From what I see it is an implementation detail
but is no longer configurable from the settings
2022-02-25 09:16:42 -05:00
Eelco Dolstra
9d4697453f
ExprAttrs::show(): Show attrs in sorted order
...
Issue #6160 .
2022-02-25 09:21:04 +01:00
Eelco Dolstra
59683733f5
Merge pull request #6089 from edolstra/dot-default
...
Replace defaultBla.$system with bla.$system.default
2022-02-24 21:16:58 +01:00
Eelco Dolstra
8518cebfce
libfetchers: Rename immutable -> locked
...
This is more consistent with flake terminology.
2022-02-24 18:09:00 +01:00
Théophane Hufschmitt
6524eb4b77
Merge pull request #5342 from Misterio77/add-sourcehut
...
Add support for sourcehut input scheme
2022-02-24 09:09:21 +01:00
Eelco Dolstra
1a6548ca75
Update docs
2022-02-22 14:32:56 +01:00
Eelco Dolstra
d4428d00ae
nix flake check: Warn about deprecated flake outputs
2022-02-22 14:19:39 +01:00
Eelco Dolstra
162fbe31ff
Replace defaultBla.$system with bla.$system.default
...
This also simplifies some InstallableFlake logic and fixes 'nix
bundle' parsing its installable twice.
Fixes #5532 .
2022-02-22 11:47:41 +01:00
Eelco Dolstra
caf5172945
Merge pull request #6136 from matthewbauer/profile-upgrade-verbosity
...
Add verbosity to nix profile upgrade
2022-02-21 22:30:47 +01:00
Eelco Dolstra
8ffb09a08a
Fix macOS build
2022-02-21 17:14:22 +01:00
Matthew Bauer
3cd958849b
Apply suggestions from code review
...
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2022-02-21 10:04:04 -06:00
Eelco Dolstra
36c7b12f33
Remove std::string alias
2022-02-21 16:37:25 +01:00
Eelco Dolstra
1ac2664472
Remove std::vector alias
2022-02-21 16:32:34 +01:00
Eelco Dolstra
fe9afb65bb
Remove std::set alias
2022-02-21 16:28:23 +01:00
Eelco Dolstra
afcdc7606c
Remove std::list alias
2022-02-21 16:25:12 +01:00
Eelco Dolstra
e2422c4582
Merge pull request #6052 from hercules-ci/issue-3294-fix-interruptCallback-deadlock
...
Fix deadlocked nix-daemon zombies on darwin #3294
2022-02-21 16:21:45 +01:00
Robert Hensing
ddb6740e7d
triggerInterrupt: Refactor to use break
2022-02-21 15:43:43 +01:00
Matthew Bauer
61295b910f
Add verbosity to nix profile upgrade
...
Followup of https://github.com/NixOS/nix/pull/6086 . This time adding a
warning if no packages are upgraded.
2022-02-20 23:46:11 -06:00
Linus Heckemann
dbdc63bc41
path-info: use full store paths when we have them
...
Fixes #5645
2022-02-19 00:32:05 +01:00
Eelco Dolstra
a768e85e2f
Merge pull request #6103 from Radvendii/welcomeText
...
add descriptive output when creating templates
2022-02-17 21:06:10 +01:00