Ben Burdette
31bcd55626
clean up makefiles
2022-04-08 15:53:24 -06:00
Ben Burdette
27d45f9eb3
minor cleanup
2022-04-08 15:46:12 -06:00
Ben Burdette
a86c2a8481
remove 'debugError', dead code
2022-04-08 13:30:18 -06:00
Ben Burdette
b8b8ec7101
move throw to preverve Error type; turn off debugger for tryEval
2022-04-08 12:34:27 -06:00
Ben Burdette
1a93ac8133
Merge remote-tracking branch 'upstream/master' into upstream-merge
2022-04-07 13:42:01 -06:00
Ben Burdette
d2ec9b4e15
in debugger mode, print the current error when another repl returns.
2022-04-07 12:09:47 -06:00
Ben Burdette
d29af88d58
newline before env
2022-04-07 11:17:57 -06:00
Ben Burdette
f37562187f
free valmap on exit
2022-04-07 11:17:31 -06:00
Ben Burdette
5cfd038bd8
show expr pos if DebugTrace one is noPos
2022-04-06 19:08:29 -06:00
Ben Burdette
1096d17b65
show 'with' bindings as well as static
2022-03-31 09:37:36 -06:00
Ben Burdette
5ab7bdf0b1
load debug trace staticenv on 'show'
2022-03-28 15:28:59 -06:00
Ben Burdette
14f515544b
debugTraceIndex
2022-03-28 12:09:21 -06:00
Eelco Dolstra
057f9ee190
nix profile install: Don't use queryDerivationOutputMap()
...
Instead get the outputs from Installable::build(). This will also
allow 'nix profile install' to support impure derivations.
Fixes #6286 .
2022-03-28 14:23:39 +02:00
Ben Burdette
1bec3fb337
add DebugTrace for error
2022-03-25 18:15:31 -06:00
Hideaki Kawai
3b776cb0a7
nix edit: support kakoune
2022-03-22 23:18:02 +09:00
Artturin
a5c969db49
nix: allow using --file - to read from stdin
2022-03-16 21:01:51 +02:00
Ben Burdette
88a54108eb
formatting
2022-03-16 12:09:47 -06:00
Ben Burdette
3dfab6e534
have only one debuggerHook declaration
2022-03-14 11:58:11 -06:00
Eelco Dolstra
761242afa0
BuildResult: Use DerivedPath
2022-03-09 12:25:35 +01:00
Eelco Dolstra
a4604f1928
Add Store::buildPathsWithResults()
...
This function is like buildPaths(), except that it returns a vector of
BuildResults containing the exact statuses and output paths of each
derivation / substitution. This is convenient for functions like
Installable::build(), because they then don't need to do another
series of calls to get the outputs of CA derivations. It's also a
precondition to impure derivations, where we *can't* query the output
of those derivations since they're not stored in the Nix database.
Note that PathSubstitutionGoal can now also return a BuildStatus.
2022-03-08 19:56:34 +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
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
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
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
Ben Burdette
c9bc3735f6
quit repl from step mode
2022-02-15 09:49:25 -07:00
Ben Burdette
e761bf0601
make an 'info' level error on break
2022-02-14 14:04:34 -07:00
Eelco Dolstra
023e459777
InstallableFlake: Default attr paths cleanup
...
This removes some duplicated logic, and fixes "nix bundle" parsing its
installable twice.
2022-02-14 21:06:11 +01:00
Eelco Dolstra
cdc90c2776
parseInstallables(): Don't try the flake attr path prefixes when no fragment is specified
...
Fixes #5880 .
2022-02-11 15:50:12 +01:00
Ben Burdette
7954a18a48
link change
2022-02-04 17:40:06 -07:00
Ben Burdette
dbe3fd3735
Merge branch 'master' into debug-step
2022-02-04 15:09:40 -07:00
Ben Burdette
3ddf864e1b
print value in break
2022-02-04 14:50:25 -07:00
Matthew Bauer
f222fba4dc
Allow missing flake.nix for --override-input target
...
At this point, we don’t know if the input is a flake or not. So, we
should allow the user to override the input with a directory without a
flake.nix.
Ideally, we could figure whether the input was originally a flake or
not, but that would require instantiating the whole flake. So just
allow it to be missing here, and rely on checks later on to verify the
input for us.
2022-02-03 20:51:47 -06:00
Eelco Dolstra
bd383d1b6f
Make most calls to determinePos() lazy
2022-02-04 00:33:21 +01:00
Eelco Dolstra
4c755c3b3f
Merge branch 'issue-3505' of https://github.com/kamadorueda/nix
2022-02-04 00:33:13 +01:00
Ben Burdette
412d58f0bb
break() primop; step and go debug commands
2022-02-03 13:15:21 -07:00
Thomas Koch
43509cc69d
use LOWDOWN_LIBS variable
...
fixes : #5931
2022-01-30 20:59:58 +02:00
Kevin Amado
c3896e19d0
forceAttrs: make pos mandatory
2022-01-21 16:32:43 -05:00
Kevin Amado
49b0bb0206
forceValue: make pos mandatory
...
- Make passing the position to `forceValue` mandatory,
this way we remember people that the position is
important for better error messages
- Add pos to all `forceValue` calls
2022-01-21 16:32:43 -05:00
Eelco Dolstra
3876238546
Add Installable::toDrvPaths()
...
This is needed to get the path of a derivation that might not exist
(e.g. for 'nix store copy-log').
InstallableStorePath::toDerivedPaths() cannot be used for this because
it calls readDerivation(), so it fails if the store doesn't have the
derivation.
2022-01-18 17:28:18 +01:00
Eelco Dolstra
4dda1f92aa
Add command 'nix store copy-log'
...
Fixes #5222 .
2022-01-18 14:08:49 +01:00
Eelco Dolstra
6448ea84ab
Factor out --from / --to logic
2022-01-18 14:08:49 +01:00
Ben Burdette
990bec78d3
clear screen and show top debug trace
2022-01-08 15:43:04 -07:00
Ben Burdette
a963674d88
optinoal error; compiles
2022-01-08 11:03:48 -07:00
Ben Burdette
c51b527c28
add env to DebugTrace
2022-01-07 16:37:44 -07:00
Ben Burdette
84aeb74377
revert value-add
2022-01-05 14:25:45 -07:00
Ben Burdette
bf8a065be0
add colors; remove headings
2022-01-05 12:28:31 -07:00
Ben Burdette
c669108981
merge cleanup
2022-01-03 18:13:16 -07:00
Ben Burdette
a47de1ac37
Merge branch 'master' into debug-exploratory-PR
2022-01-03 16:08:28 -07:00