tomberek
9f8c1183fa
Apply suggestions from code review
...
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2022-05-18 21:21:58 -04:00
Tom Bereknyei
1ca3f6035d
repl: update docs with installables
2022-05-18 21:21:38 -04:00
Tom Bereknyei
5640b52834
repl: use installables
2022-05-18 21:20:59 -04:00
Tom Bereknyei
81567a0962
repl: allow loading installables from CLI
...
repl: search installable with findAlongAttrPath
repl: refactor handling of args
repl: temp
2022-05-18 21:20:59 -04:00
Timothy DeHerrera
06d57ce759
nix repl: load flakes from cli args
...
If experimental feature "flakes" is enabled, args passed to `nix repl`
will now be considered flake refs and imported using the existing
`:load-flake` machinery.
In addition, `:load-flake` now supports loading flake fragments.
2022-05-18 21:20:59 -04:00
Théophane Hufschmitt
452ffe5464
Hint at the source file on conflict in flake new
...
Add a pointer to the source file (from the template) when `nix flake new` (or `init`) encounters an already existing file
Fix #6542
2022-05-18 16:46:13 +02:00
Théophane Hufschmitt
78dc64ec1e
Merge pull request #6544 from ncfavier/getFlake-no-write-lock-file
...
Do not attempt to write a lock file in builtins.getFlake
2022-05-18 16:41:13 +02:00
Naïm Favier
169384abb2
Do not attempt to write a lock file in builtins.getFlake
...
Fixes https://github.com/NixOS/nix/issues/6541
2022-05-18 15:45:06 +02:00
zhujun
b8e44dc62b
primop_match: fix example letter case in document
2022-05-18 14:05:26 +08:00
Ben Burdette
667074b586
first whack at passing evalState as an arg to debuggerHook.
2022-05-16 09:20:51 -06:00
Théophane Hufschmitt
43a2c13672
Make nix::eval_cache::int_t more idiomatic
...
Don’t explicitely give it a constructor, but use aggregate
initialization instead (also prevents having an implicit coertion, which
is probably good here)
2022-05-16 16:36:21 +02:00
Eli Kogan-Wang
e53349dd6e
change priority conflict message
2022-05-16 16:16:06 +02:00
Eli Kogan-Wang
27d0f6747d
resolve redundant priority passing, wrap NixInt in eval-cache variant
2022-05-16 15:17:35 +02:00
Eli Kogan-Wang
c81d24f1c7
Add int to eval-cache, bump eval cache schema version
2022-05-16 02:29:29 +02:00
elikoga
0cea59ab4b
Merge branch 'NixOS:master' into master
2022-05-16 01:01:37 +02:00
Ben Burdette
86ba0a702c
fix thunk issue
2022-05-15 12:05:51 -06:00
Ben Burdette
6faa56ea1f
remove extra argument
2022-05-15 12:05:34 -06:00
Eli Kogan-Wang
be2b19041e
Integrate review changes
2022-05-13 22:02:28 +02:00
Tom Bereknyei
8150b93968
fix: alignment during flake show of legacyPackages
...
Fixes:
https://github.com/NixOS/nix/issues/6240
https://github.com/NixOS/nix/issues/6045
2022-05-13 11:12:11 -04:00
Eelco Dolstra
bf89cd95a4
Merge pull request #6525 from J-Swift/feature/bash-prefix
...
Add `bash-prompt-prefix` option
2022-05-13 14:06:07 +02:00
Ben Burdette
2acdb90438
remove debug code
2022-05-12 14:20:45 -06:00
Ben Burdette
2d0d1ec99d
remove debug code
2022-05-12 14:15:35 -06:00
Ben Burdette
4f48095c66
Merge branch 'debugThrow' into debug-exploratory-PR
2022-05-12 14:11:35 -06:00
John Ericson
49ad315c03
Use ^
not !
in indexed store derivations installable syntax
...
Match the other syntax that was recently added
2022-05-12 20:10:02 +00:00
Ben Burdette
1ea13084c9
template-ize debugThrow
2022-05-12 13:59:58 -06:00
John Ericson
b18720ee17
Merge remote-tracking branch 'upstream/master' into indexed-store-path-outputs
2022-05-12 19:13:33 +00:00
Norbert Melzer
831e2743ea
fix GitHub URL template
2022-05-12 00:56:39 +02:00
Théophane Hufschmitt
b944b588fa
Merge pull request #6523 from ncfavier/stop-logger-legacy
...
Stop the logger properly in legacy commands
2022-05-11 16:53:57 +02:00
Naïm Favier
1461e6cdda
Stop the logger properly in legacy commands
...
Ensures the logger is stopped on exit in legacy commands. Without this,
when using `nix-build --log-format bar` and stopping nix with CTRL+C,
the bar is not cleared from the screen.
2022-05-11 12:58:45 +02:00
Eli Kogan-Wang
aefc6c4f41
Add priority for nix profile install
2022-05-11 12:16:35 +02:00
Eelco Dolstra
54457382f9
Fix static build
...
https://hydra.nixos.org/build/176211267
2022-05-11 11:36:56 +02:00
Jimmy Reichley
584475acf9
Add documentation for bash-prompt-prefix
2022-05-10 16:55:25 -04:00
Jimmy Reichley
2998527b18
Allow setting bash-prompt-prefix nix develop configuration
2022-05-10 16:53:22 -04:00
Eelco Dolstra
eb957ad6d8
Merge pull request #6497 from danielfullmer/ghe-fetcher-url
...
Use correct URL for GitHub Enterprise
2022-05-10 19:23:22 +02:00
Eelco Dolstra
a9cbc2857f
nix develop: Find bin/bash in the bashInteractive outputs
2022-05-10 16:43:41 +02:00
Ben Burdette
7cd7c7c91a
Merge branch 'master' into debug-exploratory-PR
2022-05-09 09:30:44 -06:00
Jan Tojnar
59d9551c25
libexpr: Fix manual link in error message
...
It was changed to the old manual in 8895fa70a4
2022-05-08 18:59:00 +02:00
Daniel Fullmer
7a3d5b2ff0
Use correct URL for GitHub Enterprise
...
For GitHub Enterprise, the API is accessed through a slightly different
URL. See [1], where it says:
> Use http(s)://[hostname]/api/v3 to access the API for GitHub
> Enterprise Server.
Also tested working on a GHE instance.
[1] https://docs.github.com/en/enterprise-server@3.3/rest/guides/getting-started-with-the-rest-api
2022-05-06 13:13:11 -07:00
Andreas Rammhold
059ae7f6c4
Add unit tests for libexpr ( #5377 )
...
* libexpr: fix builtins.split example
The example was previously indicating that multiple whitespaces would be
collapsed into a single captured whitespace. That isn't true and was
likely a mistake when being documented initially.
* Fix segfault on unitilized list when printing value
Since lists are just chunks of memory the individual elements in the
list might be unitilized when a programming error happens within Nix.
In this case the values are null-initialized (at least with Boehm GC)
and we can avoid a nullptr deref when printing them.
I ran into this issue while ensuring that new expression tests would
show the actual value on an assertion failure.
This is unlikely to cause any runtime performance regressions as
printing values is not really in the hot path (unless the repl is the
primary use case).
* Add operator<< for ValueTypes
* Add libexpr tests
This introduces tests for libexpr that evalulate various trivial Nix
language expressions and primop invocations that should be good smoke
tests wheter or not the implementation is behaving as expected.
2022-05-06 18:05:27 +02:00
Ben Burdette
fc66f48812
debugError()
2022-05-06 09:09:49 -06:00
Ben Burdette
2c9fafdc9e
trying debugThrow
2022-05-06 08:47:21 -06:00
Eelco Dolstra
b470218d9a
renderMarkdownToTerminal(): Avoid line overflow
...
Lowdown doesn't respect '.cols' exactly (maybe because of the
whitespace in front of each line), so adjust .cols a bit.
2022-05-06 13:14:49 +02:00
Eelco Dolstra
33affa0a02
Merge pull request #6483 from NixOS/fix-sourcehut-ref-parsing
...
Fix the parsing of the sourcehut refs file
2022-05-06 12:24:55 +02:00
Ben Burdette
99d69ac23f
fix repl bug
2022-05-05 21:23:03 -06:00
Ben Burdette
dea998b2f2
traceable_allocator
2022-05-05 20:26:10 -06:00
Ben Burdette
f400c5466d
rename valmap
2022-05-05 15:43:23 -06:00
Ben Burdette
09fcfee925
don't print the 'break' argument
2022-05-05 15:34:59 -06:00
Ben Burdette
ce304d0154
rename debug commands to be more gdb-like; hide them except in debug mode
2022-05-05 15:24:57 -06:00
Ben Burdette
0ac121a094
Merge branch 'NixOS:master' into debug-exploratory-PR
2022-05-05 13:54:20 -06:00
Eelco Dolstra
58645a78ab
builtins.break: Return argument when debugging is not enabled
2022-05-05 17:17:03 +02:00