aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-06-11Merge remote-tracking branch 'upstream/master' into errors-phase-2Ben Burdette
2020-06-11Merge pull request #3073 from tweag/machine-logsEelco Dolstra
Add an option to print the logs in a machine-readable format
2020-06-11Move names.{cc,hh} to libstoreEelco Dolstra
2020-06-11Shut up warningEelco Dolstra
2020-06-11Style fixesEelco Dolstra
2020-06-10Merge pull request #3655 from zimbatm/hash-encoding-prepareEelco Dolstra
libutils/hash: remove default encoding
2020-06-09Disable extra-platforms = i686-linux on wsl1 (#3676)Matthew Bauer
WSL1 doesn’t support i686-linux emulation, see https://github.com/microsoft/wsl/issues/2468
2020-06-08Move progress-bar.cc to libmainregnat
Needed so that we can include it as a logger in loggers.cc without adding a dependency on nix This also requires moving names.hh to libutil to prevent a circular dependency between libmain and libexpr
2020-06-08Style fixesEelco Dolstra
2020-06-08Unify the printing of the logs between bar-with-logs and rawregnat
Make the printing of the build logs systematically go through the logger, and replicate the behavior of `no-build-output` by having two different loggers (one that prints the build logs and one that doesn't)
2020-06-08Make the logger customisableregnat
Add a new `--log-format` cli argument to change the format of the logs. The possible values are - raw (the default one for old-style commands) - bar (the default one for new-style commands) - bar-with-logs (equivalent to `--print-build-logs`) - internal-json (the internal machine-readable json format)
2020-06-07set verbosity levelsBen Burdette
2020-06-06Remove error-demo/error-demo.ccTobias Pflug
The logging.hh superseeds the demo
2020-06-06Add tests for logging.hhTobias Pflug
2020-06-05Merge pull request #3656 from obsidiansystems/handle-unknown-file-ingestionEelco Dolstra
Add error message when FileIngestionMethod is out of bounds
2020-06-05Fix log-prefix of `nix build -L`Eelco Dolstra
Alternative fix to #3661. The cause was that 'name' is a std::string_view into a temporary which could get overwritten.
2020-06-04add some commentsBen Burdette
2020-06-04Add error message when FileIngestionMethod is out of boundsMatthew Bauer
bool coerces anything >0 to true, but in the future we may have other file ingestion methods. This shows a better error message when the “recursive” byte isn’t 1.
2020-06-04Make 'nix dev-shell' a deprecated alias for 'nix develop'Eelco Dolstra
2020-06-04Rename 'nix dev-shell' to 'nix develop'Eelco Dolstra
Fixes #3648.
2020-06-03Merge remote-tracking branch 'upstream/master' into errors-phase-2Ben Burdette
2020-06-03newline-as-prefix; no final newline in output.Ben Burdette
2020-06-03libutils/hash: remove default encodingzimbatm
This will make it easier to reason about the hash encoding and switch to SRI everywhere where possible.
2020-06-03Missing `#include <cassert>` in `lru-cache.hh` (#3654)John Ericson
This was a latent bug that just appeared because of the tests that were added. Remember to wait for CI! :)
2020-06-02remove extra space in SysErrorsBen Burdette
2020-06-02elide the 'ErrorInfo' in logError and logWarning callsBen Burdette
2020-06-02Merge pull request #3639 from obsidiansystems/do-fixme-store-removesEelco Dolstra
Remove `addToStore` variant as requested by `FIXME`
2020-06-02Merge branch 'lru-tests' of https://github.com/gilligan/nixEelco Dolstra
2020-06-02src/libutil/tests/lru-cache.cc: Check erase()Eelco Dolstra
Co-authored-by: James Lee <jbit@jbit.net>
2020-05-31Add tests for lru-cache.hhTobias Pflug
2020-05-30Ensure we restrict refspec interpretation while fetchingNikola Knezevic
As `git fetch` may chose to interpret refspec to it's liking, ensure that we only pass refs that begin with `refs/` as is, otherwise, prepend them with `refs/heads`. Otherwise, branches named `heads/foo` (I know it's bad, but it's allowed), would be fetched as `foo`, instead of `heads/foo`.
2020-05-30Improve ref validity checking in fetchGitNikola Knezevic
The previous regex was too strict and did not match what git was allowing. It could lead to `fetchGit` not accepting valid branch names, even though they exist in a repository (for example, branch names containing `/`, which are pretty standard, like `release/1.0` branches). The new regex defines what a branch name should **NOT** contain. It takes the definitions from `refs.c` in https://github.com/git/git and `git help check-ref-format` pages. This change also introduces a test for ref name validity checking, which compares the result from Nix with the result of `git check-ref-format --branch`.
2020-05-29Remove addToStore variant as requested by `FIXME`John Ericson
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-29Merge remote-tracking branch 'upstream/master' into errors-phase-2Ben Burdette
2020-05-28Merge pull request #3631 from andir/libutil-config-testsEelco Dolstra
Add unit tests for config.cc
2020-05-28Merge pull request #3455 from Ericson2314/enum-FileIngestionMethodEelco Dolstra
Replace some `bool recursive` with a new `FileIngestionMethod` enum
2020-05-27Use `FileIngestionMethod` for `nix hash`John Ericson
There was an enum there that matched in perfectly.
2020-05-27Rename some variables named “recursive” to “method”Matthew Bauer
This is much less confusing since recursive is no longer a boolean.
2020-05-27Don’t use FileIngestionMethod for StorePathsCommandMatthew Bauer
This is a different recursive than used in makeFixedOutputPath.
2020-05-27config.hh: Add documentationAndreas Rammhold
Provides some general overview on the mechanics of Config/Setting and comments for the public methods of Config.
2020-05-27tests/config.cc: add tests for Config::applyConfigAndreas Rammhold
2020-05-27config.cc: extract parts of applyConfigFile into applyConfigAndreas Rammhold
This moves the actual parsing of configuration contents into applyConfig which applyConfigFile is then going to call. By changing this we can now test the configuration file parsing without actually create a file on disk.
2020-05-27Add unit tests for config.ccAndreas Rammhold
2020-05-27Merge pull request #3621 from gilligan/add-json-testsEelco Dolstra
Add unit tests for "json.hh"
2020-05-27Merge pull request #3625 from gilligan/xml-writer-testsEelco Dolstra
Add unit tests for xml-writer
2020-05-26Change remaining bools with FileIngestionMethodCarlo Nucera
2020-05-26Merge remote-tracking branch 'origin/master' into enum-FileIngestionMethodCarlo Nucera
2020-05-25Add unit tests for xml-writerTobias Pflug
2020-05-25Add unit tests for "json.hh"Tobias Pflug
2020-05-25Add unit tests for hashing functionsTobias Pflug