Ben Burdette
4335ba999b
Merge remote-tracking branch 'upstream/master' into errors-phase-2
2020-06-03 17:00:00 -06:00
Ben Burdette
d82d230b40
elide the 'ErrorInfo' in logError and logWarning calls
2020-06-02 08:22:24 -06:00
John Ericson
fac0c2d54a
Remove addToStore variant as requested by FIXME
...
The idea is it's always more flexible to consumer a `Source` than a
plain string, and it might even reduce memory consumption.
I also looked at `addToStoreFromDump` with its `// FIXME: remove?`, but
the worked needed for that is far more up for interpretation, so I
punted for now.
2020-05-29 17:02:32 -04:00
Ben Burdette
734283d636
Merge remote-tracking branch 'upstream/master' into errors-phase-2
2020-05-29 09:51:37 -06:00
John Ericson
0f96f45061
Use FileIngestionMethod
for nix hash
...
There was an enum there that matched in perfectly.
2020-05-27 23:50:11 -04:00
Matthew Bauer
7873fd175d
Don’t use FileIngestionMethod for StorePathsCommand
...
This is a different recursive than used in makeFixedOutputPath.
2020-05-27 13:21:11 -05:00
Carlo Nucera
6d73c10041
Merge remote-tracking branch 'origin/master' into enum-FileIngestionMethod
2020-05-26 11:14:08 -04:00
Ben Burdette
92123c6c79
Merge remote-tracking branch 'upstream/master' into errors-phase-2
2020-05-15 07:00:36 -06:00
Ben Burdette
bfca5fc395
change status messages to info level
2020-05-13 09:52:36 -06:00
Eelco Dolstra
268ecf5b3f
nix: Don't require --experimental-features=nix-command for some subcommands
2020-05-12 15:47:09 +02:00
Ben Burdette
59b1f5c701
Merge branch 'master' into errors-phase-2
2020-05-11 14:35:30 -06:00
Ben Burdette
e3901638b5
todo removal
2020-05-06 15:01:13 -06:00
Domen Kožar
672985531c
Merge pull request #3570 from Mic92/nix-search
...
nix/search: no error for empty search results if json is enabled
2020-05-06 16:14:58 +02:00
Jörg Thalheim
85c1932c94
nix/search: no error for empty search results if json is enabled
...
- result list will be always empty if --json is passed
- for scripts an empty search result is not really an error,
we rather want to distinguish between evaluation errors and empty results
2020-05-06 14:43:54 +01:00
Eelco Dolstra
74a1bfdcab
Merge pull request #3546 from guibou/nix_readfile_on_0_sized_files
...
builtins.readFile: do not truncate content
2020-05-06 11:33:55 +02:00
Eelco Dolstra
272c4ba36d
Merge pull request #3557 from Ma27/nix-repl-help
...
Improve help-message for nix-repl
2020-05-06 11:25:47 +02:00
Eelco Dolstra
909b4a8820
nix doctor: Consistency
2020-05-05 15:27:47 +02:00
Eelco Dolstra
f132d82a79
nix --help: Group commands
2020-05-05 15:18:23 +02:00
Eelco Dolstra
a721a0b114
Flag: Use designated initializers
2020-05-04 22:40:19 +02:00
Ben Burdette
ab6f0b9641
convert some printError calls to logError
2020-05-03 08:01:25 -06:00
Maximilian Bosch
2aeb874e83
Improve help-message for nix-repl
...
* Remove obsolete `printHelp` function
* Add an example to demonstrate how to list all available commands
within the REPL
2020-05-01 23:32:01 +02:00
Eelco Dolstra
c089c52d5f
Fix build
2020-05-01 12:42:39 +02:00
Matthew Kenigsberg
d6b4047c2f
rename nix run to nix shell and nix app to nix run
...
(cherry picked from commit 5d8504b978
)
2020-05-01 12:17:36 +02:00
Ben Burdette
f5d3215c87
logError
2020-04-30 16:31:47 -06:00
Ben Burdette
171b4ce85c
typo
2020-04-30 09:57:01 -06:00
Eelco Dolstra
0135fd6ec4
nix dev-shell: Unset shellHook
...
This avoids inheriting the caller's shellHook, which can happen when
running a dev-shell inside a dev-shell.
2020-04-30 14:47:56 +02:00
Eelco Dolstra
efe6c186ea
nix dev-shell: Support structured attrs
...
Tested against https://github.com/NixOS/nixpkgs/pull/72074 .
Fixes #3540 .
2020-04-30 14:47:47 +02:00
Eelco Dolstra
2fcfc6c2c6
nix dev-shell: Refactor script for getting the environment
2020-04-30 13:05:29 +02:00
Guillaume Bouchard
7afcb5af98
Remove the drain
argument from readFile
...
Now it is always `drain` (see previous commit).
2020-04-29 18:43:45 +02:00
Matthew Kenigsberg
6d40fe573c
rename to NIX_GCROOT
2020-04-28 11:18:54 -06:00
Matthew Kenigsberg
9e95b95a5d
comment
2020-04-27 13:18:26 -06:00
Matthew Kenigsberg
a3bc695e7d
Set GCROOT to store path to prevent garbage collection
2020-04-27 11:22:20 -06:00
Ben Burdette
e4fb9a3849
remove 'format' from Error constructor calls
2020-04-21 17:07:07 -06:00
Ben Burdette
15e9564fd1
logEI for tunnelLogger and progressbar
2020-04-19 17:16:51 -06:00
Ben Burdette
3d5b1032a1
logError, logWarning; Logger functions; switch to Verbosity enum
2020-04-17 15:07:44 -06:00
Eelco Dolstra
efaffaa9d1
Use Logger::stdout()
...
(cherry picked from commit 8f41847394
)
2020-04-16 18:14:01 +02:00
Eelco Dolstra
67a5941472
Logger: Add method for writing to stdout
...
Usually this just writes to stdout, but for ProgressBar, we need to
clear the current line, write the line to stdout, and then redraw the
progress bar.
(cherry picked from commit 696c026006
)
2020-04-16 18:03:38 +02:00
Eelco Dolstra
fcd048a526
Use RootValue
2020-04-16 18:02:59 +02:00
Andreas Rammhold
d2c371927e
SourceExprCommand: allocate the vSourceExpr via uncollectable memory
...
Previously the memory would occasionally be collected during eval since
the GC doesn't consider the member variable as alive / doesn't scan the
region of memory where the pointer lives.
By using the traceable_allocator<T> allocator provided by Boehm GC we
can ensure the memory isn't collected. It should be properly freed when
SourceExprCommand goes out of scope.
2020-04-13 21:23:54 +02:00
Nikola Knezevic
f5095594e7
datatransfer.{cc,hh} -> filetransfer.{cc,hh}
2020-04-08 22:26:57 +02:00
Nikola Knezevic
c330109bfa
DataTransfer -> FileTransfer
2020-04-08 22:26:57 +02:00
Nikola Knezevic
a0c5931208
actDownload -> actDataTransfer
2020-04-08 22:26:57 +02:00
Nikola Knezevic
cd391206e6
{get,make,new}Downloader -> DataTransfer
2020-04-08 22:26:57 +02:00
Nikola Knezevic
e5cc53beec
DownloadSettings -> DataTransferSettings
2020-04-08 22:26:57 +02:00
Nikola Knezevic
741e9012d3
Rename src/lib/download.* to src/lib/datatransfer.*
2020-04-08 22:26:57 +02:00
Nikola Knezevic
65ef57e0cb
DownloadRequest -> DataTransferRequest
2020-04-08 22:26:57 +02:00
Eelco Dolstra
5449ff7d8a
Merge pull request #3477 from Ninlives/nix-run-using-env
...
`nix run` using $SHELL as default command
2020-04-08 19:35:39 +02:00
mlatus
9d04b5da17
nix run
using $SHELL as default command
2020-04-07 20:29:40 +08:00
Eelco Dolstra
462421d345
Backport libfetchers from the flakes branch
...
This provides a pluggable mechanism for defining new fetchers. It adds
a builtin function 'fetchTree' that generalizes existing fetchers like
'fetchGit', 'fetchMercurial' and 'fetchTarball'. 'fetchTree' takes a
set of attributes, e.g.
fetchTree {
type = "git";
url = "https://example.org/repo.git ";
ref = "some-branch";
rev = "abcdef...";
}
The existing fetchers are just wrappers around this. Note that the
input attributes to fetchTree are the same as flake input
specifications and flake lock file entries.
All fetchers share a common cache stored in
~/.cache/nix/fetcher-cache-v1.sqlite. This replaces the ad hoc caching
mechanisms in fetchGit and download.cc (e.g. ~/.cache/nix/{tarballs,git-revs*}).
This also adds support for Git worktrees (c169ea5904
).
2020-04-07 09:03:14 +02:00
Eelco Dolstra
3166b97174
nix shell -> nix dev-shell
2020-03-31 13:45:28 +02:00