diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-19T14·54+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-19T14·55+0100 |
commit | c758de9d22506eb279c5abe61f621e5c8f61af95 (patch) | |
tree | 3b1703133f56f7e301f538014dc7e41713a2e980 /third_party/nix/src/libstore | |
parent | b508f5b91a1b0c7009dcafb23114fff8d6020765 (diff) |
style(3p/nix): Reformat all includes to match new style r/766
Diffstat (limited to 'third_party/nix/src/libstore')
39 files changed, 103 insertions, 36 deletions
diff --git a/third_party/nix/src/libstore/binary-cache-store.cc b/third_party/nix/src/libstore/binary-cache-store.cc index a9e7057648aa..a1bcd3c0cf80 100644 --- a/third_party/nix/src/libstore/binary-cache-store.cc +++ b/third_party/nix/src/libstore/binary-cache-store.cc @@ -1,6 +1,8 @@ #include "binary-cache-store.hh" + #include <chrono> #include <future> + #include "archive.hh" #include "compression.hh" #include "derivations.hh" diff --git a/third_party/nix/src/libstore/binary-cache-store.hh b/third_party/nix/src/libstore/binary-cache-store.hh index 80121aa22ee8..cd88ccdd8433 100644 --- a/third_party/nix/src/libstore/binary-cache-store.hh +++ b/third_party/nix/src/libstore/binary-cache-store.hh @@ -1,6 +1,7 @@ #pragma once #include <atomic> + #include "crypto.hh" #include "pool.hh" #include "store-api.hh" diff --git a/third_party/nix/src/libstore/build.cc b/third_party/nix/src/libstore/build.cc index c9acb4dfb4a0..7da262206abd 100644 --- a/third_party/nix/src/libstore/build.cc +++ b/third_party/nix/src/libstore/build.cc @@ -1,3 +1,14 @@ +#include <algorithm> +#include <chrono> +#include <cstring> +#include <future> +#include <iostream> +#include <map> +#include <queue> +#include <regex> +#include <sstream> +#include <thread> + #include <errno.h> #include <fcntl.h> #include <grp.h> @@ -14,16 +25,7 @@ #include <sys/wait.h> #include <termios.h> #include <unistd.h> -#include <algorithm> -#include <chrono> -#include <cstring> -#include <future> -#include <iostream> -#include <map> -#include <queue> -#include <regex> -#include <sstream> -#include <thread> + #include "affinity.hh" #include "archive.hh" #include "builtins.hh" diff --git a/third_party/nix/src/libstore/builtins/buildenv.cc b/third_party/nix/src/libstore/builtins/buildenv.cc index 68b2dd0f391d..fd7d7e979f30 100644 --- a/third_party/nix/src/libstore/builtins/buildenv.cc +++ b/third_party/nix/src/libstore/builtins/buildenv.cc @@ -1,8 +1,10 @@ +#include <algorithm> + #include <fcntl.h> #include <glog/logging.h> #include <sys/stat.h> #include <sys/types.h> -#include <algorithm> + #include "builtins.hh" namespace nix { diff --git a/third_party/nix/src/libstore/builtins/fetchurl.cc b/third_party/nix/src/libstore/builtins/fetchurl.cc index 88acc413c9da..f3ef77fbd612 100644 --- a/third_party/nix/src/libstore/builtins/fetchurl.cc +++ b/third_party/nix/src/libstore/builtins/fetchurl.cc @@ -1,4 +1,5 @@ #include <glog/logging.h> + #include "archive.hh" #include "builtins.hh" #include "compression.hh" diff --git a/third_party/nix/src/libstore/crypto.cc b/third_party/nix/src/libstore/crypto.cc index 7d1fab8161af..44c512d33b92 100644 --- a/third_party/nix/src/libstore/crypto.cc +++ b/third_party/nix/src/libstore/crypto.cc @@ -1,4 +1,5 @@ #include "crypto.hh" + #include "globals.hh" #include "util.hh" diff --git a/third_party/nix/src/libstore/crypto.hh b/third_party/nix/src/libstore/crypto.hh index ffafe6560d15..637099231dc0 100644 --- a/third_party/nix/src/libstore/crypto.hh +++ b/third_party/nix/src/libstore/crypto.hh @@ -1,6 +1,7 @@ #pragma once #include <map> + #include "types.hh" namespace nix { diff --git a/third_party/nix/src/libstore/derivations.cc b/third_party/nix/src/libstore/derivations.cc index e75c0d77c3ac..28f775dee1e9 100644 --- a/third_party/nix/src/libstore/derivations.cc +++ b/third_party/nix/src/libstore/derivations.cc @@ -1,4 +1,5 @@ #include "derivations.hh" + #include "fs-accessor.hh" #include "globals.hh" #include "istringstream_nocopy.hh" diff --git a/third_party/nix/src/libstore/derivations.hh b/third_party/nix/src/libstore/derivations.hh index 51a2dc44b695..11277c813e20 100644 --- a/third_party/nix/src/libstore/derivations.hh +++ b/third_party/nix/src/libstore/derivations.hh @@ -1,6 +1,7 @@ #pragma once #include <map> + #include "hash.hh" #include "store-api.hh" #include "types.hh" diff --git a/third_party/nix/src/libstore/download.cc b/third_party/nix/src/libstore/download.cc index d84ac0c3cb98..16719ad7b68f 100644 --- a/third_party/nix/src/libstore/download.cc +++ b/third_party/nix/src/libstore/download.cc @@ -1,4 +1,5 @@ #include "download.hh" + #include "archive.hh" #include "compression.hh" #include "finally.hh" @@ -13,10 +14,6 @@ #include <aws/core/client/ClientConfiguration.h> #endif -#include <curl/curl.h> -#include <fcntl.h> -#include <glog/logging.h> -#include <unistd.h> #include <algorithm> #include <cmath> #include <cstring> @@ -25,6 +22,11 @@ #include <random> #include <thread> +#include <curl/curl.h> +#include <fcntl.h> +#include <glog/logging.h> +#include <unistd.h> + using namespace std::string_literals; namespace nix { diff --git a/third_party/nix/src/libstore/download.hh b/third_party/nix/src/libstore/download.hh index 8859b093e4f3..5e7bbf4ad669 100644 --- a/third_party/nix/src/libstore/download.hh +++ b/third_party/nix/src/libstore/download.hh @@ -2,6 +2,7 @@ #include <future> #include <string> + #include "globals.hh" #include "hash.hh" #include "types.hh" diff --git a/third_party/nix/src/libstore/export-import.cc b/third_party/nix/src/libstore/export-import.cc index b38b15c6f3bc..f0af044355ff 100644 --- a/third_party/nix/src/libstore/export-import.cc +++ b/third_party/nix/src/libstore/export-import.cc @@ -1,4 +1,5 @@ #include <algorithm> + #include "archive.hh" #include "store-api.hh" #include "worker-protocol.hh" diff --git a/third_party/nix/src/libstore/gc.cc b/third_party/nix/src/libstore/gc.cc index 183b3c1a4a17..44c118bed448 100644 --- a/third_party/nix/src/libstore/gc.cc +++ b/third_party/nix/src/libstore/gc.cc @@ -1,15 +1,17 @@ -#include <errno.h> -#include <fcntl.h> -#include <sys/stat.h> -#include <sys/statvfs.h> -#include <sys/types.h> -#include <unistd.h> #include <algorithm> #include <climits> #include <functional> #include <queue> #include <random> #include <regex> + +#include <errno.h> +#include <fcntl.h> +#include <sys/stat.h> +#include <sys/statvfs.h> +#include <sys/types.h> +#include <unistd.h> + #include "derivations.hh" #include "finally.hh" #include "globals.hh" diff --git a/third_party/nix/src/libstore/globals.cc b/third_party/nix/src/libstore/globals.cc index 62a8a167874b..bbcf63a6f5e4 100644 --- a/third_party/nix/src/libstore/globals.cc +++ b/third_party/nix/src/libstore/globals.cc @@ -1,8 +1,11 @@ #include "globals.hh" -#include <dlfcn.h> + #include <algorithm> #include <map> #include <thread> + +#include <dlfcn.h> + #include "archive.hh" #include "args.hh" #include "util.hh" diff --git a/third_party/nix/src/libstore/globals.hh b/third_party/nix/src/libstore/globals.hh index 0862ae986482..7b4d614f7a67 100644 --- a/third_party/nix/src/libstore/globals.hh +++ b/third_party/nix/src/libstore/globals.hh @@ -1,8 +1,10 @@ #pragma once -#include <sys/types.h> #include <limits> #include <map> + +#include <sys/types.h> + #include "config.hh" #include "types.hh" #include "util.hh" diff --git a/third_party/nix/src/libstore/http-binary-cache-store.cc b/third_party/nix/src/libstore/http-binary-cache-store.cc index 06935ce61d76..1bbdc46d3296 100644 --- a/third_party/nix/src/libstore/http-binary-cache-store.cc +++ b/third_party/nix/src/libstore/http-binary-cache-store.cc @@ -1,4 +1,5 @@ #include <glog/logging.h> + #include "binary-cache-store.hh" #include "download.hh" #include "globals.hh" diff --git a/third_party/nix/src/libstore/local-store.cc b/third_party/nix/src/libstore/local-store.cc index 93a1eab26baa..4c57c8a32a2b 100644 --- a/third_party/nix/src/libstore/local-store.cc +++ b/third_party/nix/src/libstore/local-store.cc @@ -1,4 +1,9 @@ #include "local-store.hh" + +#include <algorithm> +#include <cstring> +#include <iostream> + #include <errno.h> #include <fcntl.h> #include <glog/logging.h> @@ -11,9 +16,7 @@ #include <time.h> #include <unistd.h> #include <utime.h> -#include <algorithm> -#include <cstring> -#include <iostream> + #include "archive.hh" #include "derivations.hh" #include "globals.hh" diff --git a/third_party/nix/src/libstore/local-store.hh b/third_party/nix/src/libstore/local-store.hh index 20d372fc8d37..47fa74a97be7 100644 --- a/third_party/nix/src/libstore/local-store.hh +++ b/third_party/nix/src/libstore/local-store.hh @@ -4,6 +4,7 @@ #include <future> #include <string> #include <unordered_set> + #include "pathlocks.hh" #include "sqlite.hh" #include "store-api.hh" diff --git a/third_party/nix/src/libstore/machines.cc b/third_party/nix/src/libstore/machines.cc index 0bd65c230253..99a32f653b8d 100644 --- a/third_party/nix/src/libstore/machines.cc +++ b/third_party/nix/src/libstore/machines.cc @@ -1,6 +1,9 @@ #include "machines.hh" -#include <glog/logging.h> + #include <algorithm> + +#include <glog/logging.h> + #include "globals.hh" #include "util.hh" diff --git a/third_party/nix/src/libstore/misc.cc b/third_party/nix/src/libstore/misc.cc index 513940459736..60b5a9d078b1 100644 --- a/third_party/nix/src/libstore/misc.cc +++ b/third_party/nix/src/libstore/misc.cc @@ -1,4 +1,5 @@ #include <glog/logging.h> + #include "derivations.hh" #include "globals.hh" #include "local-store.hh" diff --git a/third_party/nix/src/libstore/nar-accessor.cc b/third_party/nix/src/libstore/nar-accessor.cc index f5073ad98076..b36f75401bd3 100644 --- a/third_party/nix/src/libstore/nar-accessor.cc +++ b/third_party/nix/src/libstore/nar-accessor.cc @@ -1,8 +1,10 @@ #include "nar-accessor.hh" + #include <algorithm> #include <map> #include <nlohmann/json.hpp> #include <stack> + #include "archive.hh" #include "json.hh" diff --git a/third_party/nix/src/libstore/nar-accessor.hh b/third_party/nix/src/libstore/nar-accessor.hh index eb6cf0fe736e..d4bd7366f87d 100644 --- a/third_party/nix/src/libstore/nar-accessor.hh +++ b/third_party/nix/src/libstore/nar-accessor.hh @@ -1,6 +1,7 @@ #pragma once #include <functional> + #include "fs-accessor.hh" namespace nix { diff --git a/third_party/nix/src/libstore/nar-info-disk-cache.cc b/third_party/nix/src/libstore/nar-info-disk-cache.cc index cbd1f5a12ab2..6d40f4abc6a8 100644 --- a/third_party/nix/src/libstore/nar-info-disk-cache.cc +++ b/third_party/nix/src/libstore/nar-info-disk-cache.cc @@ -1,6 +1,8 @@ #include "nar-info-disk-cache.hh" + #include <glog/logging.h> #include <sqlite3.h> + #include "globals.hh" #include "sqlite.hh" #include "sync.hh" diff --git a/third_party/nix/src/libstore/nar-info.cc b/third_party/nix/src/libstore/nar-info.cc index bf195290d040..492ccc08daf8 100644 --- a/third_party/nix/src/libstore/nar-info.cc +++ b/third_party/nix/src/libstore/nar-info.cc @@ -1,4 +1,5 @@ #include "nar-info.hh" + #include "globals.hh" namespace nix { diff --git a/third_party/nix/src/libstore/optimise-store.cc b/third_party/nix/src/libstore/optimise-store.cc index 98bff94e978d..215eec94fa2e 100644 --- a/third_party/nix/src/libstore/optimise-store.cc +++ b/third_party/nix/src/libstore/optimise-store.cc @@ -1,11 +1,13 @@ +#include <cstdlib> +#include <cstring> +#include <regex> + #include <errno.h> #include <stdio.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> -#include <cstdlib> -#include <cstring> -#include <regex> + #include "globals.hh" #include "glog/logging.h" #include "local-store.hh" diff --git a/third_party/nix/src/libstore/parsed-derivations.hh b/third_party/nix/src/libstore/parsed-derivations.hh index 70424b2ce187..7b2da3b566ac 100644 --- a/third_party/nix/src/libstore/parsed-derivations.hh +++ b/third_party/nix/src/libstore/parsed-derivations.hh @@ -1,4 +1,5 @@ #include <nlohmann/json.hpp> + #include "derivations.hh" namespace nix { diff --git a/third_party/nix/src/libstore/pathlocks.cc b/third_party/nix/src/libstore/pathlocks.cc index 986b5438457a..d71717e73ed2 100644 --- a/third_party/nix/src/libstore/pathlocks.cc +++ b/third_party/nix/src/libstore/pathlocks.cc @@ -1,11 +1,14 @@ #include "pathlocks.hh" + +#include <cerrno> +#include <cstdlib> + #include <fcntl.h> #include <glog/logging.h> #include <sys/file.h> #include <sys/stat.h> #include <sys/types.h> -#include <cerrno> -#include <cstdlib> + #include "sync.hh" #include "util.hh" diff --git a/third_party/nix/src/libstore/profiles.cc b/third_party/nix/src/libstore/profiles.cc index 51379710e22f..3e7126bb3343 100644 --- a/third_party/nix/src/libstore/profiles.cc +++ b/third_party/nix/src/libstore/profiles.cc @@ -1,10 +1,12 @@ #include "profiles.hh" + #include <errno.h> #include <glog/logging.h> #include <stdio.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> + #include "store-api.hh" #include "util.hh" diff --git a/third_party/nix/src/libstore/profiles.hh b/third_party/nix/src/libstore/profiles.hh index c23fe1f8598d..b1c3f0948713 100644 --- a/third_party/nix/src/libstore/profiles.hh +++ b/third_party/nix/src/libstore/profiles.hh @@ -1,6 +1,7 @@ #pragma once #include <time.h> + #include "pathlocks.hh" #include "types.hh" diff --git a/third_party/nix/src/libstore/references.cc b/third_party/nix/src/libstore/references.cc index 5413bfb5cf74..d8c4620a16c9 100644 --- a/third_party/nix/src/libstore/references.cc +++ b/third_party/nix/src/libstore/references.cc @@ -1,7 +1,10 @@ #include "references.hh" -#include <glog/logging.h> + #include <cstdlib> #include <map> + +#include <glog/logging.h> + #include "archive.hh" #include "hash.hh" #include "util.hh" diff --git a/third_party/nix/src/libstore/remote-fs-accessor.cc b/third_party/nix/src/libstore/remote-fs-accessor.cc index 044b9ab5f931..63a0f58fda51 100644 --- a/third_party/nix/src/libstore/remote-fs-accessor.cc +++ b/third_party/nix/src/libstore/remote-fs-accessor.cc @@ -1,7 +1,9 @@ #include "remote-fs-accessor.hh" + #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> + #include "json.hh" #include "nar-accessor.hh" diff --git a/third_party/nix/src/libstore/remote-store.cc b/third_party/nix/src/libstore/remote-store.cc index ce2fc3888774..39c908afed3a 100644 --- a/third_party/nix/src/libstore/remote-store.cc +++ b/third_party/nix/src/libstore/remote-store.cc @@ -1,4 +1,7 @@ #include "remote-store.hh" + +#include <cstring> + #include <errno.h> #include <fcntl.h> #include <glog/logging.h> @@ -7,7 +10,7 @@ #include <sys/types.h> #include <sys/un.h> #include <unistd.h> -#include <cstring> + #include "affinity.hh" #include "archive.hh" #include "derivations.hh" diff --git a/third_party/nix/src/libstore/remote-store.hh b/third_party/nix/src/libstore/remote-store.hh index dd37b83f84a5..f2692193433e 100644 --- a/third_party/nix/src/libstore/remote-store.hh +++ b/third_party/nix/src/libstore/remote-store.hh @@ -2,6 +2,7 @@ #include <limits> #include <string> + #include "store-api.hh" namespace nix { diff --git a/third_party/nix/src/libstore/s3-binary-cache-store.cc b/third_party/nix/src/libstore/s3-binary-cache-store.cc index 8730c2dd4df2..1249a92d3f58 100644 --- a/third_party/nix/src/libstore/s3-binary-cache-store.cc +++ b/third_party/nix/src/libstore/s3-binary-cache-store.cc @@ -1,6 +1,7 @@ #if ENABLE_S3 #include "s3-binary-cache-store.hh" + #include <aws/core/Aws.h> #include <aws/core/VersionConfig.h> #include <aws/core/auth/AWSCredentialsProvider.h> @@ -16,6 +17,7 @@ #include <aws/s3/model/ListObjectsRequest.h> #include <aws/s3/model/PutObjectRequest.h> #include <aws/transfer/TransferManager.h> + #include "compression.hh" #include "download.hh" #include "globals.hh" diff --git a/third_party/nix/src/libstore/s3-binary-cache-store.hh b/third_party/nix/src/libstore/s3-binary-cache-store.hh index b9ed04ed112f..24cb67721a92 100644 --- a/third_party/nix/src/libstore/s3-binary-cache-store.hh +++ b/third_party/nix/src/libstore/s3-binary-cache-store.hh @@ -1,6 +1,7 @@ #pragma once #include <atomic> + #include "binary-cache-store.hh" namespace nix { diff --git a/third_party/nix/src/libstore/sqlite.cc b/third_party/nix/src/libstore/sqlite.cc index aa6c15ec1595..85d159d620ec 100644 --- a/third_party/nix/src/libstore/sqlite.cc +++ b/third_party/nix/src/libstore/sqlite.cc @@ -1,7 +1,10 @@ #include "sqlite.hh" + +#include <atomic> + #include <glog/logging.h> #include <sqlite3.h> -#include <atomic> + #include "util.hh" namespace nix { diff --git a/third_party/nix/src/libstore/sqlite.hh b/third_party/nix/src/libstore/sqlite.hh index 633a12189a6c..298bb574ea2d 100644 --- a/third_party/nix/src/libstore/sqlite.hh +++ b/third_party/nix/src/libstore/sqlite.hh @@ -2,6 +2,7 @@ #include <functional> #include <string> + #include "types.hh" class sqlite3; diff --git a/third_party/nix/src/libstore/store-api.cc b/third_party/nix/src/libstore/store-api.cc index 12b9b1def4bb..2ea478c1bddf 100644 --- a/third_party/nix/src/libstore/store-api.cc +++ b/third_party/nix/src/libstore/store-api.cc @@ -1,6 +1,9 @@ #include "store-api.hh" -#include <glog/logging.h> + #include <future> + +#include <glog/logging.h> + #include "crypto.hh" #include "derivations.hh" #include "globals.hh" diff --git a/third_party/nix/src/libstore/store-api.hh b/third_party/nix/src/libstore/store-api.hh index a1106dbfeb53..d4e207128bc2 100644 --- a/third_party/nix/src/libstore/store-api.hh +++ b/third_party/nix/src/libstore/store-api.hh @@ -7,6 +7,7 @@ #include <string> #include <unordered_map> #include <unordered_set> + #include "config.hh" #include "crypto.hh" #include "globals.hh" |