diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-27T20·56+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-27T20·56+0100 |
commit | 3652326ed281f5f753423acef51103fb8df62a6d (patch) | |
tree | 3e6969ccaa13e77eb42f887cd081b45d7fffed80 /third_party/nix/src/libexpr | |
parent | 86a35d963d7b6108dec44411c8ebd5aadbb148ac (diff) |
refactor(3p/nix): Anchor local includes at src/ r/865
Previously all includes were anchored in one global mess of header files. This moves the includes into filesystem "namespaces" (if you will) for each sub-package of Nix. Note: This commit does not introduce the relevant build system changes.
Diffstat (limited to 'third_party/nix/src/libexpr')
33 files changed, 107 insertions, 109 deletions
diff --git a/third_party/nix/src/libexpr/attr-path.cc b/third_party/nix/src/libexpr/attr-path.cc index 5f14fca21493..e366f18575e7 100644 --- a/third_party/nix/src/libexpr/attr-path.cc +++ b/third_party/nix/src/libexpr/attr-path.cc @@ -1,9 +1,9 @@ -#include "attr-path.hh" +#include "libexpr/attr-path.hh" #include <absl/strings/numbers.h> -#include "eval-inline.hh" -#include "util.hh" +#include "libexpr/eval-inline.hh" +#include "libutil/util.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/attr-path.hh b/third_party/nix/src/libexpr/attr-path.hh index 889c2158d79e..a71ceb9a06cd 100644 --- a/third_party/nix/src/libexpr/attr-path.hh +++ b/third_party/nix/src/libexpr/attr-path.hh @@ -3,7 +3,7 @@ #include <map> #include <string> -#include "eval.hh" +#include "libexpr/eval.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/attr-set.cc b/third_party/nix/src/libexpr/attr-set.cc index 6310cc66b726..c5355a69c5cb 100644 --- a/third_party/nix/src/libexpr/attr-set.cc +++ b/third_party/nix/src/libexpr/attr-set.cc @@ -1,4 +1,4 @@ -#include "attr-set.hh" +#include "libexpr/attr-set.hh" #include <new> @@ -6,7 +6,7 @@ #include <gc/gc_cpp.h> #include <glog/logging.h> -#include "eval-inline.hh" +#include "libexpr/eval-inline.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/attr-set.hh b/third_party/nix/src/libexpr/attr-set.hh index 37e6d5e1ca8f..ff13e9a7fa07 100644 --- a/third_party/nix/src/libexpr/attr-set.hh +++ b/third_party/nix/src/libexpr/attr-set.hh @@ -4,9 +4,9 @@ #include <absl/container/btree_map.h> #include <gc/gc_allocator.h> -#include "nixexpr.hh" -#include "symbol-table.hh" -#include "types.hh" +#include "libexpr/nixexpr.hh" +#include "libexpr/symbol-table.hh" +#include "libutil/types.hh" namespace nix { // TODO(tazjin): ::expr diff --git a/third_party/nix/src/libexpr/common-eval-args.cc b/third_party/nix/src/libexpr/common-eval-args.cc index 19271f2cc582..fe8a6a02af08 100644 --- a/third_party/nix/src/libexpr/common-eval-args.cc +++ b/third_party/nix/src/libexpr/common-eval-args.cc @@ -1,9 +1,9 @@ -#include "common-eval-args.hh" +#include "libexpr/common-eval-args.hh" -#include "download.hh" -#include "eval.hh" -#include "shared.hh" -#include "util.hh" +#include "libexpr/eval.hh" +#include "libmain/shared.hh" +#include "libstore/download.hh" +#include "libutil/util.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/common-eval-args.hh b/third_party/nix/src/libexpr/common-eval-args.hh index dad30daf6b13..be7126c039df 100644 --- a/third_party/nix/src/libexpr/common-eval-args.hh +++ b/third_party/nix/src/libexpr/common-eval-args.hh @@ -1,6 +1,6 @@ #pragma once -#include "args.hh" +#include "libutil/args.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/eval-inline.hh b/third_party/nix/src/libexpr/eval-inline.hh index ca0cf2a3607a..5162ab3971a3 100644 --- a/third_party/nix/src/libexpr/eval-inline.hh +++ b/third_party/nix/src/libexpr/eval-inline.hh @@ -1,6 +1,6 @@ #pragma once -#include "eval.hh" +#include "libexpr/eval.hh" #define LocalNoInline(f) \ static f __attribute__((noinline)); \ diff --git a/third_party/nix/src/libexpr/eval.cc b/third_party/nix/src/libexpr/eval.cc index ca2b65203f19..91dff6b40dc9 100644 --- a/third_party/nix/src/libexpr/eval.cc +++ b/third_party/nix/src/libexpr/eval.cc @@ -1,4 +1,4 @@ -#include "eval.hh" +#include "libexpr/eval.hh" #include <algorithm> #include <chrono> @@ -15,15 +15,15 @@ #include <sys/time.h> #include <unistd.h> -#include "derivations.hh" -#include "download.hh" -#include "eval-inline.hh" -#include "function-trace.hh" -#include "globals.hh" -#include "hash.hh" -#include "json.hh" -#include "store-api.hh" -#include "util.hh" +#include "libexpr/eval-inline.hh" +#include "libexpr/function-trace.hh" +#include "libstore/derivations.hh" +#include "libstore/download.hh" +#include "libstore/globals.hh" +#include "libstore/store-api.hh" +#include "libutil/hash.hh" +#include "libutil/json.hh" +#include "libutil/util.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/eval.hh b/third_party/nix/src/libexpr/eval.hh index f13e8553d14b..9e4e500b4745 100644 --- a/third_party/nix/src/libexpr/eval.hh +++ b/third_party/nix/src/libexpr/eval.hh @@ -4,12 +4,12 @@ #include <optional> #include <unordered_map> -#include "attr-set.hh" -#include "config.hh" -#include "hash.hh" -#include "nixexpr.hh" -#include "symbol-table.hh" -#include "value.hh" +#include "libexpr/attr-set.hh" +#include "libexpr/nixexpr.hh" +#include "libexpr/symbol-table.hh" +#include "libexpr/value.hh" +#include "libutil/config.hh" +#include "libutil/hash.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/function-trace.cc b/third_party/nix/src/libexpr/function-trace.cc index 8b0d60fab8be..b1b856965c2a 100644 --- a/third_party/nix/src/libexpr/function-trace.cc +++ b/third_party/nix/src/libexpr/function-trace.cc @@ -1,4 +1,4 @@ -#include "function-trace.hh" +#include "libexpr/function-trace.hh" #include <glog/logging.h> diff --git a/third_party/nix/src/libexpr/function-trace.hh b/third_party/nix/src/libexpr/function-trace.hh index 93d70862eda1..6b810159b8fc 100644 --- a/third_party/nix/src/libexpr/function-trace.hh +++ b/third_party/nix/src/libexpr/function-trace.hh @@ -2,7 +2,7 @@ #include <chrono> -#include "eval.hh" +#include "libexpr/eval.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/get-drvs.cc b/third_party/nix/src/libexpr/get-drvs.cc index 968108e78c51..875c8ca2a0eb 100644 --- a/third_party/nix/src/libexpr/get-drvs.cc +++ b/third_party/nix/src/libexpr/get-drvs.cc @@ -1,4 +1,4 @@ -#include "get-drvs.hh" +#include "libexpr/get-drvs.hh" #include <cstring> #include <regex> @@ -7,9 +7,9 @@ #include <absl/strings/numbers.h> #include <glog/logging.h> -#include "derivations.hh" -#include "eval-inline.hh" -#include "util.hh" +#include "libexpr/eval-inline.hh" +#include "libstore/derivations.hh" +#include "libutil/util.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/get-drvs.hh b/third_party/nix/src/libexpr/get-drvs.hh index a0840ee9b280..bb20c32c0b44 100644 --- a/third_party/nix/src/libexpr/get-drvs.hh +++ b/third_party/nix/src/libexpr/get-drvs.hh @@ -3,7 +3,7 @@ #include <map> #include <string> -#include "eval.hh" +#include "libexpr/eval.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/json-to-value.cc b/third_party/nix/src/libexpr/json-to-value.cc index d46e6f268e9f..4411b411f229 100644 --- a/third_party/nix/src/libexpr/json-to-value.cc +++ b/third_party/nix/src/libexpr/json-to-value.cc @@ -1,4 +1,4 @@ -#include "json-to-value.hh" +#include "libexpr/json-to-value.hh" #include <cstring> diff --git a/third_party/nix/src/libexpr/json-to-value.hh b/third_party/nix/src/libexpr/json-to-value.hh index f416dfbb3860..041a4c596591 100644 --- a/third_party/nix/src/libexpr/json-to-value.hh +++ b/third_party/nix/src/libexpr/json-to-value.hh @@ -2,7 +2,7 @@ #include <string> -#include "eval.hh" +#include "libexpr/eval.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/lexer.l b/third_party/nix/src/libexpr/lexer.l index 9cdb2bd97ecf..be5fe4a78f7d 100644 --- a/third_party/nix/src/libexpr/lexer.l +++ b/third_party/nix/src/libexpr/lexer.l @@ -14,8 +14,8 @@ %{ #include <boost/lexical_cast.hpp> -#include "nixexpr.hh" -#include "parser-tab.hh" +#include "libexpr/nixexpr.hh" +#include "generated/parser-tab.hh" using namespace nix; diff --git a/third_party/nix/src/libexpr/names.cc b/third_party/nix/src/libexpr/names.cc index 769f9e99db29..1e9c2f2f4aac 100644 --- a/third_party/nix/src/libexpr/names.cc +++ b/third_party/nix/src/libexpr/names.cc @@ -1,10 +1,10 @@ -#include "names.hh" +#include "libexpr/names.hh" #include <memory> #include <absl/strings/numbers.h> -#include "util.hh" +#include "libutil/util.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/names.hh b/third_party/nix/src/libexpr/names.hh index 521740152ca2..061388d517cd 100644 --- a/third_party/nix/src/libexpr/names.hh +++ b/third_party/nix/src/libexpr/names.hh @@ -3,7 +3,7 @@ #include <memory> #include <regex> -#include "types.hh" +#include "libutil/types.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/nixexpr.cc b/third_party/nix/src/libexpr/nixexpr.cc index ef4a75ed8d5b..28d8eee7a7f8 100644 --- a/third_party/nix/src/libexpr/nixexpr.cc +++ b/third_party/nix/src/libexpr/nixexpr.cc @@ -1,9 +1,9 @@ -#include "nixexpr.hh" +#include "libexpr/nixexpr.hh" #include <cstdlib> -#include "derivations.hh" -#include "util.hh" +#include "libstore/derivations.hh" +#include "libutil/util.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/nixexpr.hh b/third_party/nix/src/libexpr/nixexpr.hh index 8817fbc9ddb8..0bf5245181ec 100644 --- a/third_party/nix/src/libexpr/nixexpr.hh +++ b/third_party/nix/src/libexpr/nixexpr.hh @@ -2,9 +2,9 @@ #include <map> -#include "symbol-table.hh" -#include "types.hh" // TODO(tazjin): audit this include -#include "value.hh" +#include "libexpr/symbol-table.hh" +#include "libexpr/value.hh" +#include "libutil/types.hh" // TODO(tazjin): audit this include namespace nix { diff --git a/third_party/nix/src/libexpr/parser.y b/third_party/nix/src/libexpr/parser.y index 9ba053ee7b12..fe8759f3c6b7 100644 --- a/third_party/nix/src/libexpr/parser.y +++ b/third_party/nix/src/libexpr/parser.y @@ -16,9 +16,9 @@ #ifndef BISON_HEADER #define BISON_HEADER -#include "util.hh" -#include "nixexpr.hh" -#include "eval.hh" +#include "libutil/util.hh" +#include "libexpr/nixexpr.hh" +#include "libexpr/eval.hh" #include <glog/logging.h> namespace nix { @@ -50,8 +50,8 @@ namespace nix { %{ -#include "parser-tab.hh" -#include "lexer-tab.hh" +#include "generated/parser-tab.hh" +#include "generated/lexer-tab.hh" YY_DECL; @@ -539,9 +539,9 @@ formal #include <fcntl.h> #include <unistd.h> -#include "eval.hh" -#include "download.hh" -#include "store-api.hh" +#include "libexpr/eval.hh" +#include "libstore/download.hh" +#include "libstore/store-api.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/primops.cc b/third_party/nix/src/libexpr/primops.cc index 8ade52bd9122..67a8a03ab02d 100644 --- a/third_party/nix/src/libexpr/primops.cc +++ b/third_party/nix/src/libexpr/primops.cc @@ -1,4 +1,4 @@ -#include "primops.hh" +#include "libexpr/primops.hh" #include <algorithm> #include <cstring> @@ -11,19 +11,19 @@ #include <sys/types.h> #include <unistd.h> -#include "archive.hh" -#include "derivations.hh" -#include "download.hh" -#include "eval-inline.hh" -#include "eval.hh" -#include "globals.hh" -#include "json-to-value.hh" -#include "json.hh" -#include "names.hh" -#include "store-api.hh" -#include "util.hh" -#include "value-to-json.hh" -#include "value-to-xml.hh" +#include "libexpr/eval-inline.hh" +#include "libexpr/eval.hh" +#include "libexpr/json-to-value.hh" +#include "libexpr/names.hh" +#include "libexpr/value-to-json.hh" +#include "libexpr/value-to-xml.hh" +#include "libstore/derivations.hh" +#include "libstore/download.hh" +#include "libstore/globals.hh" +#include "libstore/store-api.hh" +#include "libutil/archive.hh" +#include "libutil/json.hh" +#include "libutil/util.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/primops.hh b/third_party/nix/src/libexpr/primops.hh index 6abd0508a09b..ad646e4d0b3c 100644 --- a/third_party/nix/src/libexpr/primops.hh +++ b/third_party/nix/src/libexpr/primops.hh @@ -1,7 +1,7 @@ #include <tuple> #include <vector> -#include "eval.hh" +#include "libexpr/eval.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/primops/context.cc b/third_party/nix/src/libexpr/primops/context.cc index 481a2910bf84..3a39e03eabc7 100644 --- a/third_party/nix/src/libexpr/primops/context.cc +++ b/third_party/nix/src/libexpr/primops/context.cc @@ -1,6 +1,6 @@ -#include "derivations.hh" -#include "eval-inline.hh" -#include "primops.hh" +#include "libexpr/eval-inline.hh" +#include "libexpr/primops.hh" +#include "libstore/derivations.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/primops/fetchGit.cc b/third_party/nix/src/libexpr/primops/fetchGit.cc index 2cfdefe7abfd..7262a291559f 100644 --- a/third_party/nix/src/libexpr/primops/fetchGit.cc +++ b/third_party/nix/src/libexpr/primops/fetchGit.cc @@ -7,12 +7,12 @@ #include <glog/logging.h> #include <sys/time.h> -#include "download.hh" -#include "eval-inline.hh" -#include "hash.hh" -#include "pathlocks.hh" -#include "primops.hh" -#include "store-api.hh" +#include "libexpr/eval-inline.hh" +#include "libexpr/primops.hh" +#include "libstore/download.hh" +#include "libstore/pathlocks.hh" +#include "libstore/store-api.hh" +#include "libutil/hash.hh" using namespace std::string_literals; diff --git a/third_party/nix/src/libexpr/primops/fetchMercurial.cc b/third_party/nix/src/libexpr/primops/fetchMercurial.cc index 71722faedf11..3ece094e6a8d 100644 --- a/third_party/nix/src/libexpr/primops/fetchMercurial.cc +++ b/third_party/nix/src/libexpr/primops/fetchMercurial.cc @@ -7,11 +7,11 @@ #include <glog/logging.h> #include <sys/time.h> -#include "download.hh" -#include "eval-inline.hh" -#include "pathlocks.hh" -#include "primops.hh" -#include "store-api.hh" +#include "libexpr/eval-inline.hh" +#include "libexpr/primops.hh" +#include "libstore/download.hh" +#include "libstore/pathlocks.hh" +#include "libstore/store-api.hh" using namespace std::string_literals; diff --git a/third_party/nix/src/libexpr/primops/fromTOML.cc b/third_party/nix/src/libexpr/primops/fromTOML.cc index cc7b3cfcc33e..66e2e1b4094f 100644 --- a/third_party/nix/src/libexpr/primops/fromTOML.cc +++ b/third_party/nix/src/libexpr/primops/fromTOML.cc @@ -1,6 +1,6 @@ #include "cpptoml/cpptoml.h" -#include "eval-inline.hh" -#include "primops.hh" +#include "libexpr/eval-inline.hh" +#include "libexpr/primops.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/symbol-table.cc b/third_party/nix/src/libexpr/symbol-table.cc index 6abaedc5173c..2b27ca54c289 100644 --- a/third_party/nix/src/libexpr/symbol-table.cc +++ b/third_party/nix/src/libexpr/symbol-table.cc @@ -1,4 +1,4 @@ -#include "symbol-table.hh" +#include "libexpr/symbol-table.hh" #include <absl/container/node_hash_set.h> #include <absl/strings/string_view.h> diff --git a/third_party/nix/src/libexpr/value-to-json.cc b/third_party/nix/src/libexpr/value-to-json.cc index 0b641a41b5ac..a51a1cee3043 100644 --- a/third_party/nix/src/libexpr/value-to-json.cc +++ b/third_party/nix/src/libexpr/value-to-json.cc @@ -1,11 +1,11 @@ -#include "value-to-json.hh" +#include "libexpr/value-to-json.hh" #include <cstdlib> #include <iomanip> -#include "eval-inline.hh" -#include "json.hh" -#include "util.hh" +#include "libexpr/eval-inline.hh" +#include "libutil/json.hh" +#include "libutil/util.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/value-to-json.hh b/third_party/nix/src/libexpr/value-to-json.hh index 6ec36c829d37..294d77604560 100644 --- a/third_party/nix/src/libexpr/value-to-json.hh +++ b/third_party/nix/src/libexpr/value-to-json.hh @@ -3,8 +3,8 @@ #include <map> #include <string> -#include "eval.hh" -#include "nixexpr.hh" +#include "libexpr/eval.hh" +#include "libexpr/nixexpr.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/value-to-xml.cc b/third_party/nix/src/libexpr/value-to-xml.cc index 149bf764f0f9..2a46ac84be61 100644 --- a/third_party/nix/src/libexpr/value-to-xml.cc +++ b/third_party/nix/src/libexpr/value-to-xml.cc @@ -1,10 +1,10 @@ -#include "value-to-xml.hh" +#include "libexpr/value-to-xml.hh" #include <cstdlib> -#include "eval-inline.hh" -#include "util.hh" -#include "xml-writer.hh" +#include "libexpr/eval-inline.hh" +#include "libutil/util.hh" +#include "libutil/xml-writer.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/value-to-xml.hh b/third_party/nix/src/libexpr/value-to-xml.hh index e7749dd7ae30..18c5279236ff 100644 --- a/third_party/nix/src/libexpr/value-to-xml.hh +++ b/third_party/nix/src/libexpr/value-to-xml.hh @@ -3,8 +3,8 @@ #include <map> #include <string> -#include "eval.hh" -#include "nixexpr.hh" +#include "libexpr/eval.hh" +#include "libexpr/nixexpr.hh" namespace nix { diff --git a/third_party/nix/src/libexpr/value.hh b/third_party/nix/src/libexpr/value.hh index 1f20a440d933..01b9fd3a216d 100644 --- a/third_party/nix/src/libexpr/value.hh +++ b/third_party/nix/src/libexpr/value.hh @@ -1,11 +1,9 @@ #pragma once -#include "symbol-table.hh" -#include "types.hh" - -#if HAVE_BOEHMGC #include <gc/gc_allocator.h> -#endif + +#include "libexpr/symbol-table.hh" +#include "libutil/types.hh" namespace nix { |