util.hh: Delete remaining file and clean up headers

Change-Id: Ic1f68e6af658e94ef7922841dd3ad4c69551ef56
This commit is contained in:
Tom Hubrecht 2024-05-28 16:53:21 +02:00
parent f0eb650ee8
commit a39ba22ff7
92 changed files with 50 additions and 161 deletions

View file

@ -11,7 +11,6 @@
#include "derivations.hh"
#include "globals.hh"
#include "store-api.hh"
#include "util.hh"
#include "crypto.hh"
#include <sodium.h>

View file

@ -2,7 +2,6 @@
#include "common-eval-args.hh"
#include "shared.hh"
#include "filetransfer.hh"
#include "util.hh"
#include "eval.hh"
#include "fetchers.hh"
#include "registry.hh"

View file

@ -1,4 +1,3 @@
#include "util.hh"
#include "editor-for.hh"
#include "environment-variables.hh"
#include "source-path.hh"

View file

@ -1,7 +1,6 @@
#include "globals.hh"
#include "installable-attr-path.hh"
#include "outputs-spec.hh"
#include "util.hh"
#include "command.hh"
#include "attr-path.hh"
#include "common-eval-args.hh"

View file

@ -4,7 +4,6 @@
#include "globals.hh"
#include "installable-value.hh"
#include "outputs-spec.hh"
#include "util.hh"
#include "command.hh"
#include "attr-path.hh"
#include "common-eval-args.hh"

View file

@ -2,7 +2,6 @@
#include "installable-flake.hh"
#include "installable-derived-path.hh"
#include "outputs-spec.hh"
#include "util.hh"
#include "command.hh"
#include "attr-path.hh"
#include "common-eval-args.hh"

View file

@ -3,26 +3,21 @@
#include "installable-derived-path.hh"
#include "installable-attr-path.hh"
#include "installable-flake.hh"
#include "logging.hh"
#include "outputs-spec.hh"
#include "util.hh"
#include "command.hh"
#include "attr-path.hh"
#include "common-eval-args.hh"
#include "derivations.hh"
#include "eval-inline.hh"
#include "eval.hh"
#include "eval-settings.hh"
#include "get-drvs.hh"
#include "store-api.hh"
#include "shared.hh"
#include "flake/flake.hh"
#include "eval-cache.hh"
#include "url.hh"
#include "registry.hh"
#include "build-result.hh"
#include <regex>
#include <queue>
#include <nlohmann/json.hpp>

View file

@ -1,7 +1,6 @@
#pragma once
///@file
#include "util.hh"
#include "path.hh"
#include "outputs-spec.hh"
#include "derived-path.hh"

View file

@ -1,5 +1,5 @@
#include "markdown.hh"
#include "util.hh"
#include "error.hh"
#include "finally.hh"
#include "terminal.hh"

View file

@ -1,3 +1,7 @@
#include "error.hh"
#include "file-system.hh"
#include "logging.hh"
#include <csignal>
#include <cstdio>
#include <iostream>
#include <string>
@ -18,11 +22,8 @@ extern "C" {
}
#endif
#include "signals.hh"
#include "finally.hh"
#include "repl-interacter.hh"
#include "util.hh"
#include "repl.hh"
namespace nix {

View file

@ -1,6 +1,5 @@
#include "attr-path.hh"
#include "eval-inline.hh"
#include "util.hh"
namespace nix {

View file

@ -5,7 +5,6 @@
#include "print-options.hh"
#include "shared.hh"
#include "types.hh"
#include "util.hh"
#include "store-api.hh"
#include "derivations.hh"
#include "downstream-placeholder.hh"

View file

@ -1,4 +1,5 @@
#include "flake.hh"
#include "logging.hh"
#include "users.hh"
#include "fetch-settings.hh"

View file

@ -1,5 +1,4 @@
#include "get-drvs.hh"
#include "util.hh"
#include "eval-inline.hh"
#include "derivations.hh"
#include "store-api.hh"

View file

@ -2,7 +2,6 @@
#include "derivations.hh"
#include "eval.hh"
#include "symbol-table.hh"
#include "util.hh"
#include "print.hh"
#include "escape-string.hh"

View file

@ -1,6 +1,7 @@
#include "print-ambiguous.hh"
#include "attr-set.hh"
#include "logging.hh"
#include "print.hh"
#include "eval.hh"
#include "signals.hh"
#include "escape-string.hh"

View file

@ -1,5 +1,4 @@
#include "search-path.hh"
#include "util.hh"
namespace nix {

View file

@ -1,6 +1,5 @@
#include "value-to-json.hh"
#include "eval-inline.hh"
#include "util.hh"
#include "signals.hh"
#include "store-api.hh"

View file

@ -1,11 +1,7 @@
#include "value-to-xml.hh"
#include "xml-writer.hh"
#include "eval-inline.hh"
#include "util.hh"
#include "signals.hh"
#include <cstdlib>
namespace nix {

View file

@ -1,7 +1,6 @@
#pragma once
///@file
#include "util.hh"
#include "comparator.hh"
#include "derived-path.hh"
#include "variant-wrapper.hh"

View file

@ -3,7 +3,6 @@
#include "types.hh"
#include "config.hh"
#include "util.hh"
#include <map>
#include <limits>

View file

@ -3,7 +3,6 @@
#include "source-path.hh"
#include "store-api.hh"
#include "util.hh"
#include "repair-flag.hh"
#include "content-address.hh"

View file

@ -2,6 +2,7 @@
#include "args/root.hh"
#include "globals.hh"
#include "loggers.hh"
#include "logging.hh"
namespace nix {

View file

@ -1,7 +1,6 @@
#include "environment-variables.hh"
#include "loggers.hh"
#include "progress-bar.hh"
#include "util.hh"
namespace nix {

View file

@ -1,5 +1,4 @@
#include "progress-bar.hh"
#include "util.hh"
#include "sync.hh"
#include "store-api.hh"
#include "names.hh"

View file

@ -2,7 +2,6 @@
#include "shared.hh"
#include "store-api.hh"
#include "gc-store.hh"
#include "util.hh"
#include "signals.hh"
#include "loggers.hh"
#include "progress-bar.hh"

View file

@ -1,7 +1,6 @@
#pragma once
///@file
#include "util.hh"
#include "args.hh"
#include "args/root.hh"
#include "common-args.hh"

View file

@ -5,7 +5,6 @@
#include "builtins/buildenv.hh"
#include "references.hh"
#include "finally.hh"
#include "util.hh"
#include "archive.hh"
#include "compression.hh"
#include "common-protocol.hh"

View file

@ -1,11 +1,8 @@
#include "serialise.hh"
#include "util.hh"
#include "path-with-outputs.hh"
#include "store-api.hh"
#include "build-result.hh"
#include "common-protocol.hh"
#include "common-protocol-impl.hh"
#include "archive.hh"
#include "derivations.hh"
#include <nlohmann/json.hpp>

View file

@ -1,9 +1,9 @@
#pragma once
///@file
#include "types.hh"
#include <map>
#include <string>
namespace nix {

View file

@ -3,7 +3,6 @@
#include "store-api.hh"
#include "globals.hh"
#include "types.hh"
#include "util.hh"
#include "split.hh"
#include "common-protocol.hh"
#include "common-protocol-impl.hh"

View file

@ -1,7 +1,7 @@
#pragma once
///@file
#include "util.hh"
#include "config.hh"
#include "path.hh"
#include "outputs-spec.hh"
#include "comparator.hh"

View file

@ -19,7 +19,6 @@
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <queue>
#include <random>
#include <thread>

View file

@ -1,8 +1,9 @@
#pragma once
///@file
#include "logging.hh"
#include "serialise.hh"
#include "types.hh"
#include "hash.hh"
#include "config.hh"
#include <string>

View file

@ -1,18 +1,14 @@
#include "derivations.hh"
#include "globals.hh"
#include "local-store.hh"
#include "pathlocks.hh"
#include "processes.hh"
#include "signals.hh"
#include "finally.hh"
#include "unix-domain-socket.hh"
#include <functional>
#include <queue>
#include <algorithm>
#include <regex>
#include <random>
#include <climits>
#include <errno.h>
#include <fcntl.h>
#include <poll.h>

View file

@ -1,14 +1,15 @@
#include "environment-variables.hh"
#include "globals.hh"
#include "file-system.hh"
#include "logging.hh"
#include "strings.hh"
#include "users.hh"
#include "archive.hh"
#include "args.hh"
#include "abstract-setting-to-json.hh"
#include "compute-levels.hh"
#include "current-process.hh"
#include <algorithm>
#include <map>
#include <mutex>
#include <thread>
#include <dlfcn.h>

View file

@ -3,11 +3,9 @@
#include "sqlite.hh"
#include "pathlocks.hh"
#include "store-api.hh"
#include "indirect-root-store.hh"
#include "sync.hh"
#include "util.hh"
#include <chrono>
#include <future>

View file

@ -1,4 +1,5 @@
#include "nar-info-disk-cache.hh"
#include "logging.hh"
#include "sync.hh"
#include "sqlite.hh"
#include "globals.hh"

View file

@ -1,4 +1,3 @@
#include "util.hh"
#include "local-store.hh"
#include "globals.hh"
#include "signals.hh"

View file

@ -5,7 +5,6 @@
#include "outputs-spec.hh"
#include "path-regex.hh"
#include "strings.hh"
#include "util.hh"
namespace nix {

View file

@ -1,12 +1,8 @@
#include "path-references.hh"
#include "hash.hh"
#include "util.hh"
#include "archive.hh"
#include <map>
#include <cstdlib>
#include <mutex>
#include <algorithm>
namespace nix {

View file

@ -1,10 +1,8 @@
#include "pathlocks.hh"
#include "util.hh"
#include "logging.hh"
#include "signals.hh"
#include "sync.hh"
#include <cerrno>
#include <cstdlib>
#include <fcntl.h>
#include <sys/types.h>

View file

@ -1,5 +1,4 @@
#include "serialise.hh"
#include "util.hh"
#include "signals.hh"
#include "path-with-outputs.hh"
#include "gc-store.hh"

View file

@ -1,11 +1,9 @@
#include "serialise.hh"
#include "util.hh"
#include "path-with-outputs.hh"
#include "store-api.hh"
#include "build-result.hh"
#include "serve-protocol.hh"
#include "serve-protocol-impl.hh"
#include "archive.hh"
#include "path-info.hh"
#include <nlohmann/json.hpp>

View file

@ -1,12 +1,11 @@
#include "sqlite.hh"
#include "globals.hh"
#include "util.hh"
#include "logging.hh"
#include "signals.hh"
#include "url.hh"
#include <sqlite3.h>
#include <atomic>
namespace nix {

View file

@ -1,9 +1,7 @@
#include "crypto.hh"
#include "fs-accessor.hh"
#include "globals.hh"
#include "derivations.hh"
#include "store-api.hh"
#include "util.hh"
#include "nar-info-disk-cache.hh"
#include "thread-pool.hh"
#include "url.hh"

View file

@ -1,6 +1,7 @@
#pragma once
///@file
#include "logging.hh"
#include "nar-info.hh"
#include "realisation.hh"
#include "path.hh"

View file

@ -1,5 +1,4 @@
#include "serialise.hh"
#include "util.hh"
#include "path-with-outputs.hh"
#include "store-api.hh"
#include "build-result.hh"

View file

@ -13,8 +13,8 @@
#include "archive.hh"
#include "file-system.hh"
#include "util.hh"
#include "config.hh"
#include "logging.hh"
#include "signals.hh"
namespace nix {

View file

@ -5,6 +5,7 @@
#include "environment-variables.hh"
#include "experimental-features-json.hh"
#include "logging.hh"
#include <glob.h>

View file

@ -1,13 +1,17 @@
#pragma once
///@file
#include <iostream>
#include "experimental-features.hh"
#include "types.hh"
#include <functional>
#include <map>
#include <memory>
#include <limits>
#include <nlohmann/json_fwd.hpp>
#include <optional>
#include <set>
#include "util.hh"
namespace nix {

View file

@ -1,6 +1,8 @@
#pragma once
///@file
#include <tuple>
#define DECLARE_ONE_CMP(PRE, QUAL, COMPARATOR, MY_TYPE) \
PRE bool QUAL operator COMPARATOR(const MY_TYPE & other) const;
#define DECLARE_EQUAL(prefix, qualification, my_type) \

View file

@ -1,7 +1,5 @@
#include "compression.hh"
#include "tarfile.hh"
#include "util.hh"
#include "finally.hh"
#include "signals.hh"
#include "logging.hh"
@ -13,7 +11,6 @@
#include <brotli/decode.h>
#include <brotli/encode.h>
#include <iostream>
namespace nix {

View file

@ -12,7 +12,9 @@
* instantiation.
*/
#include "args.hh"
#include "config.hh"
#include "logging.hh"
namespace nix {

View file

@ -3,6 +3,7 @@
#include "abstract-setting-to-json.hh"
#include "experimental-features.hh"
#include "file-system.hh"
#include "logging.hh"
#include "strings.hh"
#include "config-impl.hh"

View file

@ -1,11 +1,11 @@
#include "environment-variables.hh"
#include "error.hh"
#include "logging.hh"
#include "position.hh"
#include "terminal.hh"
#include <iostream>
#include <optional>
#include "serialise.hh"
#include <sstream>
namespace nix {

View file

@ -2,7 +2,6 @@
// Required for instances of to_json and from_json for ExperimentalFeature
#include "experimental-features-json.hh"
#include "strings.hh"
#include "util.hh"
#include "nlohmann/json.hpp"

View file

@ -1,5 +1,6 @@
#include "file-system.hh"
#include "finally.hh"
#include "logging.hh"
#include "serialise.hh"
#include "signals.hh"

View file

@ -6,6 +6,7 @@
#include "file-descriptor.hh"
#include "file-system.hh"
#include "finally.hh"
#include "logging.hh"
#include "serialise.hh"
#include "signals.hh"
#include "types.hh"

View file

@ -1,4 +1,3 @@
#include <iostream>
#include <cstring>
#include <openssl/crypto.h>
@ -8,8 +7,8 @@
#include "args.hh"
#include "hash.hh"
#include "archive.hh"
#include "logging.hh"
#include "split.hh"
#include "util.hh"
#include <sys/types.h>
#include <sys/stat.h>

View file

@ -1,15 +1,12 @@
#include "environment-variables.hh"
#include "file-descriptor.hh"
#include "logging.hh"
#include "util.hh"
#include "config.hh"
#include "source-path.hh"
#include "position.hh"
#include "terminal.hh"
#include <atomic>
#include <nlohmann/json.hpp>
#include <iostream>
namespace nix {

View file

@ -110,7 +110,6 @@ libutil_headers = files(
'url-name.hh',
'url.hh',
'users.hh',
'util.hh',
'variant-wrapper.hh',
'xml-writer.hh',
)

View file

@ -1,9 +1,7 @@
#include "references.hh"
#include "hash.hh"
#include "util.hh"
#include "archive.hh"
#include "logging.hh"
#include <map>
#include <cstdlib>
#include <mutex>
#include <algorithm>

View file

@ -1,5 +1,4 @@
#include "serialise.hh"
#include "util.hh"
#include "signals.hh"
#include <cstring>

View file

@ -5,7 +5,6 @@
#include "strings.hh"
#include "types.hh"
#include "util.hh"
#include "file-descriptor.hh"
namespace boost::context { struct stack_context; }

View file

@ -1,5 +1,4 @@
#include "signals.hh"
#include "util.hh"
#include "error.hh"
#include "sync.hh"
#include "terminal.hh"

View file

@ -1,7 +1,6 @@
#pragma once
/// @file
#include "types.hh"
#include "error.hh"
#include <sys/types.h>
@ -12,7 +11,6 @@
#include <atomic>
#include <functional>
#include <sstream>
namespace nix {

View file

@ -4,8 +4,6 @@
#include <optional>
#include <string_view>
#include "util.hh"
namespace nix {
/**

View file

@ -4,6 +4,7 @@
#include <algorithm>
#include <ostream>
#include <vector>
namespace nix {

View file

@ -2,8 +2,11 @@
///@file
#include "comparator.hh"
#include "types.hh"
#include <set>
#include <string_view>
#include <string>
#include <variant>
namespace nix {

View file

@ -2,6 +2,7 @@
#include <archive_entry.h>
#include "file-system.hh"
#include "logging.hh"
#include "serialise.hh"
#include "tarfile.hh"

View file

@ -1,4 +1,5 @@
#include "thread-pool.hh"
#include "logging.hh"
#include "signals.hh"
namespace nix {

View file

@ -1,13 +1,12 @@
#pragma once
///@file
#include "error.hh"
#include "sync.hh"
#include "util.hh"
#include <queue>
#include <functional>
#include <thread>
#include <map>
#include <atomic>
namespace nix {

View file

@ -1,4 +1,3 @@
#include <iostream>
#include <regex>
#include "url-name.hh"

View file

@ -5,9 +5,6 @@
#include <optional>
#include "url.hh"
#include "url-parts.hh"
#include "util.hh"
#include "split.hh"
namespace nix {

View file

@ -1,40 +0,0 @@
#pragma once
///@file
#include "types.hh"
#include "error.hh"
#include "logging.hh"
#include "ansicolor.hh"
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/resource.h>
#include <dirent.h>
#include <unistd.h>
#include <signal.h>
#include <boost/lexical_cast.hpp>
#include <atomic>
#include <functional>
#include <map>
#include <sstream>
#include <optional>
#ifndef HAVE_STRUCT_DIRENT_D_TYPE
#define DT_UNKNOWN 0
#define DT_REG 1
#define DT_LNK 2
#define DT_DIR 3
#endif
namespace nix {
struct Sink;
struct Source;
}

View file

@ -15,7 +15,6 @@
#include "globals.hh"
#include "current-process.hh"
#include "derivations.hh"
#include "util.hh"
#include "shared.hh"
#include "path-with-outputs.hh"
#include "eval.hh"

View file

@ -1,5 +1,4 @@
#include "user-env.hh"
#include "util.hh"
#include "derivations.hh"
#include "store-api.hh"
#include "path-with-outputs.hh"

View file

@ -7,7 +7,6 @@
#include "attr-path.hh"
#include "value-to-xml.hh"
#include "value-to-json.hh"
#include "util.hh"
#include "store-api.hh"
#include "local-fs-store.hh"
#include "common-eval-args.hh"

View file

@ -1,5 +1,4 @@
#include "dotgraph.hh"
#include "util.hh"
#include "store-api.hh"
#include <iostream>

View file

@ -1,5 +1,4 @@
#include "graphml.hh"
#include "util.hh"
#include "store-api.hh"
#include "derivations.hh"

View file

@ -11,7 +11,6 @@
#include "serve-protocol.hh"
#include "serve-protocol-impl.hh"
#include "shared.hh"
#include "util.hh"
#include "graphml.hh"
#include "legacy.hh"
#include "path-with-outputs.hh"

View file

@ -5,7 +5,6 @@
#include "local-store.hh"
#include "remote-store.hh"
#include "remote-store-connection.hh"
#include "util.hh"
#include "serialise.hh"
#include "archive.hh"
#include "globals.hh"

View file

@ -8,7 +8,6 @@
#include "derivations.hh"
#include "progress-bar.hh"
#include "run.hh"
#include "util.hh"
#include <iterator>
#include <memory>

View file

@ -6,7 +6,6 @@
#include "shared.hh"
#include "store-api.hh"
#include "local-fs-store.hh"
#include "util.hh"
#include "worker-protocol.hh"
using namespace nix;

View file

@ -6,12 +6,9 @@
#include <string_view>
#include <unistd.h>
#include "escape-string.hh"
#include "test-session.hh"
#include "tests/characterization.hh"
#include "tests/cli-literate-parser.hh"
#include "tests/terminal-code-eater.hh"
#include "util.hh"
#include "strings.hh"
using namespace std::string_literals;

View file

@ -10,7 +10,6 @@
#include "filetransfer.hh"
#include "shared.hh"
#include "store-api.hh"
#include "util.hh"
constexpr std::string_view INVALID_CHANNEL = "channel:example";
constexpr std::string_view CHANNEL_URL = "https://nixos.org/channels/example/nixexprs.tar.xz";

View file

@ -1,6 +1,6 @@
#pragma once
#include "util.hh"
#include "environment-variables.hh"
#include "types.hh"
namespace nix {

View file

@ -8,7 +8,6 @@
#include <filesystem>
#include "util.hh"
#include "types.hh"
namespace nix {

View file

@ -3,7 +3,6 @@
#include "escape-char.hh"
#include "libexpr/print.hh"
#include "types.hh"
#include "util.hh"
#include <ranges>
#include <boost/algorithm/string/replace.hpp>
#include <boost/algorithm/string/trim.hpp>
@ -18,7 +17,6 @@
#include "libexpr/print.hh"
#include "shlex.hh"
#include "types.hh"
#include "util.hh"
#include "strings.hh"
static constexpr const bool DEBUG_PARSER = false;

View file

@ -2,7 +2,6 @@
#include "logging.hh"
#include "nixexpr.hh"
#include "util.hh"
#include <fstream>
#include <gtest/gtest.h>

View file

@ -3,7 +3,6 @@
#include "strings.hh"
#include "types.hh"
#include "terminal.hh"
#include "util.hh"
#include <gtest/gtest.h>
@ -11,7 +10,7 @@
namespace nix {
/* ----------- tests for util.hh ------------------------------------------------*/
/* ----------- tests for libutil ------------------------------------------------*/
/* ----------------------------------------------------------------------------
* absPath