aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/util.hh
AgeCommit message (Collapse)Author
2020-09-21Move Callback into its own headerEelco Dolstra
This gets rid of the inclusion of <future> in util.hh, cutting compilation time by ~20s (CPU time). Issue #4045.
2020-08-20Allow 'nix' subcommands to provide docs in Markdown formatEelco Dolstra
2020-08-05Merge remote-tracking branch 'upstream/master' into misc-caJohn Ericson
2020-07-30unsigned long long -> uint64_tEelco Dolstra
2020-07-16Merge branch 'optional-derivation-output-storepath' of ↵Carlo Nucera
github.com:obsidiansystems/nix into ca-derivation-data-types
2020-07-12Move C++17 "pattern matching" boilerplat to utils.hhJohn Ericson
2020-06-17Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-15Merge branch 'errors-phase-2' of https://github.com/bburdette/nixEelco Dolstra
2020-06-12Use `std::string_view` in a few more placesJohn Ericson
2020-06-11Merge remote-tracking branch 'upstream/master' into errors-phase-2Ben Burdette
2020-06-04Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-04Make 'nix dev-shell' a deprecated alias for 'nix develop'Eelco Dolstra
2020-05-28Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-05-11Merge branch 'master' into errors-phase-2Ben Burdette
2020-05-10SimplifyEelco Dolstra
2020-05-08Enable `baseNameOf` testTobias Pflug
Add note about removal of trailing slashes in the doc comment of baseNameOf and enabled the test.
2020-05-08Enable `dirOf` testTobias Pflug
Adjusted the doc comment for `dirOf` to reflect the implementation behavior.
2020-05-07Remove replaceInSetTobias Pflug
The function isn't being used anywhere so it seems safe to remove
2020-05-06Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-04-29StringSink pre allocateGuillaume Bouchard
When used with `readFile`, we have a pretty good heuristic of the file size, so `reserve` this in the `string`. This will save some allocation / copy when the string is growing.
2020-04-29Remove the `drain` argument from `readFile`Guillaume Bouchard
Now it is always `drain` (see previous commit).
2020-04-24all things error to error.hhBen Burdette
2020-04-23Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-04-22Don't include error.hh in util.hh to prevent header bloatEelco Dolstra
2020-04-22Merge branch 'error-format' of https://github.com/bburdette/nixEelco Dolstra
2020-04-21add ErrorInfo to BaseErrorBen Burdette
2020-04-16Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-04-14add NIX_USER_CONF_FILESzimbatm
Motivation: maintain project-level configuration files. Document the whole situation a bit better so that it corresponds to the implementation, and add NIX_USER_CONF_FILES that allows overriding which user files Nix will load during startup.
2020-04-06Merge branch 'master' into error-formatBen Burdette
2020-03-30Backport 'nix dev-shell' from the flakes branchEelco Dolstra
This also adds a '--profile' option to 'nix build' (replacing 'nix-env --set').
2020-03-30build with makeBen Burdette
2020-03-27remove util.hh from depsBen Burdette
2020-03-24Misc changes from the flakes branchEelco Dolstra
2020-03-24Pretty-print 'nix why-depends' / 'nix-store -q --tree' outputEelco Dolstra
Extracted from 678301072f05b650dc15c5edb4c25f08f0d6cace.
2020-03-24absPath(): Use std::optionalEelco Dolstra
(cherry picked from commit 1bf9eb21b75f0d93d9c1633ea2e6fdf840047e79)
2020-03-24Add function for quoting stringsEelco Dolstra
(cherry picked from commit 7dcf5b011a0942ecf953f2b607c4c8d0e9e652c7)
2020-02-01Factor out TreeInfoEelco Dolstra
2020-02-01Show "warning:" in yellow instead of redEelco Dolstra
2020-01-31Change lock file format to use an attribute representation of flake refs ↵Eelco Dolstra
rather than URLs
2020-01-31Use light box drawing symbolsEelco Dolstra
2020-01-31nix flake list-inputs: Pretty-print the treeEelco Dolstra
2020-01-21Pluggable fetchersEelco Dolstra
Flakes are now fetched using an extensible mechanism. Also lots of other flake cleanups.
2020-01-21absPath(): Use std::optionalEelco Dolstra
2019-12-18Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2019-12-16nix-store -r: Handle symlinks to store pathsEelco Dolstra
Fixes #3270.
2019-12-11Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2019-12-10Make the Store API more type-safeEelco Dolstra
Most functions now take a StorePath argument rather than a Path (which is just an alias for std::string). The StorePath constructor ensures that the path is syntactically correct (i.e. it looks like <store-dir>/<base32-hash>-<name>). Similarly, functions like buildPaths() now take a StorePathWithOutputs, rather than abusing Path by adding a '!<outputs>' suffix. Note that the StorePath type is implemented in Rust. This involves some hackery to allow Rust values to be used directly in C++, via a helper type whose destructor calls the Rust type's drop() function. The main issue is the dynamic nature of C++ move semantics: after we have moved a Rust value, we should not call the drop function on the original value. So when we move a value, we set the original value to bitwise zero, and the destructor only calls drop() if the value is not bitwise zero. This should be sufficient for most types. Also lots of minor cleanups to the C++ API to make it more modern (e.g. using std::optional and std::string_view in some places).
2019-12-05Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2019-12-05Eliminate more pass-by-value in variadic callsEelco Dolstra
2019-12-04Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra