Ben Burdette
b1c53b034c
Merge branch 'errors-phase-2' into caveman-LOCs
2020-06-08 11:10:13 -06:00
Ben Burdette
94c347577e
set verbosity levels
2020-06-07 07:24:49 -06:00
Tobias Pflug
e60747b5fb
Remove error-demo/error-demo.cc
...
The logging.hh superseeds the demo
2020-06-06 10:23:12 +02:00
Tobias Pflug
952e72c804
Add tests for logging.hh
2020-06-06 10:22:32 +02:00
Ben Burdette
94427ffee3
add some comments
2020-06-04 11:53:19 -06:00
Ben Burdette
4335ba999b
Merge remote-tracking branch 'upstream/master' into errors-phase-2
2020-06-03 17:00:00 -06:00
Ben Burdette
f97576c5d9
newline-as-prefix; no final newline in output.
2020-06-03 14:47:00 -06:00
John Ericson
01572c2198
Missing #include <cassert>
in lru-cache.hh
( #3654 )
...
This was a latent bug that just appeared because of the tests that were
added. Remember to wait for CI! :)
2020-06-03 10:15:22 +00:00
Ben Burdette
156d4f8bc8
remove extra space in SysErrors
2020-06-02 08:45:37 -06:00
Ben Burdette
d82d230b40
elide the 'ErrorInfo' in logError and logWarning calls
2020-06-02 08:22:24 -06:00
Eelco Dolstra
bfa1acd85c
Merge pull request #3639 from obsidiansystems/do-fixme-store-removes
...
Remove `addToStore` variant as requested by `FIXME`
2020-06-02 15:39:07 +02:00
Eelco Dolstra
c16fdda3a6
Merge branch 'lru-tests' of https://github.com/gilligan/nix
2020-06-02 12:07:48 +02:00
Eelco Dolstra
e9fee8e6a7
src/libutil/tests/lru-cache.cc: Check erase()
...
Co-authored-by: James Lee <jbit@jbit.net>
2020-06-02 12:06:59 +02:00
Tobias Pflug
eca1ff7a9f
Add tests for lru-cache.hh
2020-05-31 01:05:05 +02:00
Nikola Knezevic
fb38459d6e
Ensure we restrict refspec interpretation while fetching
...
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-30 12:33:38 +02:00
Nikola Knezevic
77007d4eab
Improve ref validity checking in fetchGit
...
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-30 12:29:35 +02: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
Eelco Dolstra
f60ce4fa20
Merge pull request #3631 from andir/libutil-config-tests
...
Add unit tests for config.cc
2020-05-28 13:51:37 +02:00
Eelco Dolstra
de141fcb79
Merge pull request #3455 from Ericson2314/enum-FileIngestionMethod
...
Replace some `bool recursive` with a new `FileIngestionMethod` enum
2020-05-28 13:50:06 +02: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
c66441a646
Rename some variables named “recursive” to “method”
...
This is much less confusing since recursive is no longer a boolean.
2020-05-27 13:21:26 -05: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
Andreas Rammhold
fc137d2f00
config.hh: Add documentation
...
Provides some general overview on the mechanics of Config/Setting and
comments for the public methods of Config.
2020-05-27 17:47:18 +02:00
Andreas Rammhold
9df3d8ccd7
tests/config.cc: add tests for Config::applyConfig
2020-05-27 17:47:18 +02:00
Andreas Rammhold
e1b8c64c04
config.cc: extract parts of applyConfigFile into applyConfig
...
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-27 17:47:18 +02:00
Andreas Rammhold
93129cf1dd
Add unit tests for config.cc
2020-05-27 17:47:17 +02:00
Eelco Dolstra
66d3ac94c9
Merge pull request #3621 from gilligan/add-json-tests
...
Add unit tests for "json.hh"
2020-05-27 11:08:12 +02:00
Eelco Dolstra
dae6a267a8
Merge pull request #3625 from gilligan/xml-writer-tests
...
Add unit tests for xml-writer
2020-05-27 11:07:53 +02:00
Carlo Nucera
b90241ceb1
Change remaining bools with FileIngestionMethod
2020-05-26 11:32:41 -04:00
Carlo Nucera
6d73c10041
Merge remote-tracking branch 'origin/master' into enum-FileIngestionMethod
2020-05-26 11:14:08 -04:00
Tobias Pflug
4b388e8431
Add unit tests for xml-writer
2020-05-25 18:34:55 +02:00
Tobias Pflug
c284700867
Add unit tests for "json.hh"
2020-05-25 11:57:45 +02:00
Tobias Pflug
ecc5c90dfc
Add unit tests for hashing functions
2020-05-25 11:50:41 +02:00
Ben Burdette
b7057fa627
remove error-demo from make; clean up comment
2020-05-21 16:04:18 -06:00
Ben Burdette
0e49de6a2b
position for stdin, string; (string) for trace; fix tests
2020-05-21 14:28:45 -06:00
Ben Burdette
6a420d672c
print LOC for stdin, string args
2020-05-20 22:18:26 -06:00
Ben Burdette
85ce455b85
get code lines from the nix file
2020-05-20 17:25:02 -06:00
Tobias Pflug
a73a820a5d
Add unit testes for url.cc
...
This adds tests for
- parseURL
- percentDecode
- decodeQuery
2020-05-20 16:37:35 +02:00
Eelco Dolstra
5ef64f05e6
Cleanup
2020-05-18 15:50:29 +02:00
Eelco Dolstra
0ed946aa61
Merge branch 'wait-for-builders' of https://github.com/serokell/nix
2020-05-18 13:48:45 +02:00
Ben Burdette
92123c6c79
Merge remote-tracking branch 'upstream/master' into errors-phase-2
2020-05-15 07:00:36 -06:00
Ben Burdette
19694aa213
fix compile errors
2020-05-14 12:28:18 -06:00
Ben Burdette
4daccb279c
formatting
2020-05-14 10:28:17 -06:00
Alexander Bantyev
183dd28266
Don't lock a user while doing remote builds
2020-05-14 17:00:54 +03:00
Ben Burdette
ef9dd9f9bc
formatting and a few minor changes
2020-05-13 15:56:39 -06:00
Ben Burdette
c79d4addab
consistent capitalization
2020-05-13 10:02:18 -06:00
Ben Burdette
bfca5fc395
change status messages to info level
2020-05-13 09:52:36 -06:00
Ben Burdette
ecbb8e9c0a
no blank line if no LOC
2020-05-12 14:41:30 -06:00
Ben Burdette
960d4362ed
hint only
2020-05-12 13:54:18 -06:00