Skip to content

Commit

Permalink
A bunch of small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericson2314 committed Jul 18, 2024
1 parent 307440b commit de1ec5a
Show file tree
Hide file tree
Showing 29 changed files with 38 additions and 53 deletions.
2 changes: 1 addition & 1 deletion src/build-remote/build-remote.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "globals.hh"
#include "serialise.hh"
#include "build-result.hh"
#include "store-api.hh"
#include "store-open.hh"
#include "strings.hh"
#include "derivations.hh"
#include "local-store.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/libcmd/command.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "command.hh"
#include "markdown.hh"
#include "store-api.hh"
#include "store-open.hh"
#include "local-fs-store.hh"
#include "derivations.hh"
#include "nixexpr.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/libexpr/primops/fetchClosure.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "primops.hh"
#include "store-api.hh"
#include "store-open.hh"
#include "realisation.hh"
#include "make-content-addressed.hh"
#include "url.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/libstore-c/nix_api_store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Store * nix_store_open(nix_c_context * context, const char * uri, const char ***
if (!params)
return new Store{nix::openStore(uri_str)};

nix::Store::Params params_map;
nix::StoreReference::Params params_map;
for (size_t i = 0; params[i] != nullptr; i++) {
params_map[params[i][0]] = params[i][1];
}
Expand Down
1 change: 1 addition & 0 deletions src/libstore/build/drv-output-substitution-goal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "worker.hh"
#include "substitution-goal.hh"
#include "callback.hh"
#include "store-open.hh"

namespace nix {

Expand Down
2 changes: 1 addition & 1 deletion src/libstore/profiles.hh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ typedef std::list<Generation> Generations;
*/
std::pair<Generations, std::optional<GenerationNumber>> findGenerations(Path profile);

class LocalFSStore;
struct LocalFSStore;

/**
* Create a new generation of the given profile
Expand Down
7 changes: 4 additions & 3 deletions src/libstore/remote-store.hh
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ struct RemoteStoreConfig : virtual StoreConfig
* \todo RemoteStore is a misnomer - should be something like
* DaemonStore.
*/
class RemoteStore : public virtual RemoteStoreConfig,
struct RemoteStore :
public virtual RemoteStoreConfig,
public virtual Store,
public virtual GcStore,
public virtual LogStore
{
public:
using Config = RemoteStoreConfig;

RemoteStore(const Params & params);
RemoteStore(const Config & config);

/* Implementations of abstract store API methods. */

Expand Down
2 changes: 2 additions & 0 deletions src/libstore/store-reference.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include <regex>

#include <nlohmann/json.hpp>

#include "error.hh"
#include "url.hh"
#include "store-reference.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/libutil/config-abstract.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct JustValue
};

template<typename T>
auto && operator <<(auto && str, const JustValue<T> & opt)
auto && operator<<(auto && str, const JustValue<T> & opt)
{
return str << opt.get();
}
Expand Down
2 changes: 1 addition & 1 deletion src/nix-build/nix-build.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include "current-process.hh"
#include "parsed-derivations.hh"
#include "store-api.hh"
#include "store-open.hh"
#include "local-fs-store.hh"
#include "globals.hh"
#include "realisation.hh"
Expand Down
1 change: 0 additions & 1 deletion src/nix-channel/nix-channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "shared.hh"
#include "globals.hh"
#include "filetransfer.hh"
#include "store-api.hh"
#include "store-open.hh"
#include "legacy.hh"
#include "eval-settings.hh" // for defexpr
Expand Down
2 changes: 1 addition & 1 deletion src/nix-collect-garbage/nix-collect-garbage.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "file-system.hh"
#include "signals.hh"
#include "store-api.hh"
#include "store-open.hh"
#include "store-cast.hh"
#include "gc-store.hh"
#include "profiles.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/nix-copy-closure/nix-copy-closure.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "shared.hh"
#include "realisation.hh"
#include "store-api.hh"
#include "store-open.hh"
#include "legacy.hh"

using namespace nix;
Expand Down
2 changes: 1 addition & 1 deletion src/nix-env/nix-env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "profiles.hh"
#include "path-with-outputs.hh"
#include "shared.hh"
#include "store-api.hh"
#include "store-open.hh"
#include "local-fs-store.hh"
#include "user-env.hh"
#include "value-to-json.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/nix-instantiate/nix-instantiate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "signals.hh"
#include "value-to-xml.hh"
#include "value-to-json.hh"
#include "store-api.hh"
#include "store-open.hh"
#include "local-fs-store.hh"
#include "common-eval-args.hh"
#include "legacy.hh"
Expand Down
1 change: 1 addition & 0 deletions src/nix-store/nix-store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "derivations.hh"
#include "dotgraph.hh"
#include "globals.hh"
#include "store-open.hh"
#include "store-cast.hh"
#include "local-fs-store.hh"
#include "log-store.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/nix/flake.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "flake/flake.hh"
#include "get-drvs.hh"
#include "signals.hh"
#include "store-api.hh"
#include "store-open.hh"
#include "derivations.hh"
#include "outputs-spec.hh"
#include "attr-path.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/nix/log.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "command.hh"
#include "common-args.hh"
#include "shared.hh"
#include "store-api.hh"
#include "store-open.hh"
#include "log-store.hh"
#include "progress-bar.hh"

Expand Down
3 changes: 2 additions & 1 deletion src/nix/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#include "globals.hh"
#include "legacy.hh"
#include "shared.hh"
#include "store-api.hh"
#include "store-open.hh"
#include "store-registration.hh"
#include "filetransfer.hh"
#include "finally.hh"
#include "loggers.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/nix/make-content-addressed.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "command.hh"
#include "store-api.hh"
#include "store-open.hh"
#include "make-content-addressed.hh"
#include "common-args.hh"

Expand Down
2 changes: 1 addition & 1 deletion src/nix/prefetch.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "command.hh"
#include "common-args.hh"
#include "shared.hh"
#include "store-api.hh"
#include "store-open.hh"
#include "filetransfer.hh"
#include "finally.hh"
#include "progress-bar.hh"
Expand Down
1 change: 1 addition & 0 deletions src/nix/repl.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "eval.hh"
#include "eval-settings.hh"
#include "globals.hh"
#include "store-open.hh"
#include "command.hh"
#include "installable-value.hh"
#include "repl.hh"
Expand Down
2 changes: 1 addition & 1 deletion src/nix/sigs.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "signals.hh"
#include "command.hh"
#include "shared.hh"
#include "store-api.hh"
#include "store-open.hh"
#include "thread-pool.hh"
#include "progress-bar.hh"

Expand Down
3 changes: 2 additions & 1 deletion src/nix/unix/daemon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "local-store.hh"
#include "remote-store.hh"
#include "remote-store-connection.hh"
#include "store-open.hh"
#include "serialise.hh"
#include "archive.hh"
#include "globals.hh"
Expand Down Expand Up @@ -239,7 +240,7 @@ static PeerInfo getPeerInfo(int remote)
*/
static ref<Store> openUncachedStore()
{
Store::Params params; // FIXME: get params from somewhere
StoreReference::Params params; // FIXME: get params from somewhere
// Disable caching since the client already does that.
params["path-info-cache-size"] = "0";
return openStore(settings.storeUri, params);
Expand Down
2 changes: 1 addition & 1 deletion src/nix/verify.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "command.hh"
#include "shared.hh"
#include "store-api.hh"
#include "store-open.hh"
#include "thread-pool.hh"
#include "signals.hh"
#include "keys.hh"
Expand Down
8 changes: 2 additions & 6 deletions tests/unit/libstore/local-overlay-store.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// FIXME: Odd failures for templates that are causing the PR to break
// for now with discussion with @Ericson2314 to comment out.
#if 0
# include <gtest/gtest.h>
#include <gtest/gtest.h>

# include "local-overlay-store.hh"
#include "local-overlay-store.hh"

namespace nix {

Expand Down Expand Up @@ -31,4 +28,3 @@ TEST(LocalOverlayStore, constructConfig_rootPath)
}

} // namespace nix
#endif
14 changes: 2 additions & 12 deletions tests/unit/libstore/local-store.cc
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
// FIXME: Odd failures for templates that are causing the PR to break
// for now with discussion with @Ericson2314 to comment out.
#if 0
# include <gtest/gtest.h>
#include <gtest/gtest.h>

# include "local-store.hh"

// Needed for template specialisations. This is not good! When we
// overhaul how store configs work, this should be fixed.
# include "args.hh"
# include "config-impl.hh"
# include "abstract-setting-to-json.hh"
#include "local-store.hh"

namespace nix {

Expand Down Expand Up @@ -37,4 +28,3 @@ TEST(LocalStore, constructConfig_rootPath)
}

} // namespace nix
#endif
8 changes: 2 additions & 6 deletions tests/unit/libstore/ssh-store.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// FIXME: Odd failures for templates that are causing the PR to break
// for now with discussion with @Ericson2314 to comment out.
#if 0
# include <gtest/gtest.h>
#include <gtest/gtest.h>

# include "ssh-store.hh"
#include "ssh-store.hh"

namespace nix {

Expand Down Expand Up @@ -52,4 +49,3 @@ TEST(MountedSSHStore, constructConfig)
}

}
#endif
8 changes: 2 additions & 6 deletions tests/unit/libstore/uds-remote-store.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// FIXME: Odd failures for templates that are causing the PR to break
// for now with discussion with @Ericson2314 to comment out.
#if 0
# include <gtest/gtest.h>
#include <gtest/gtest.h>

# include "uds-remote-store.hh"
#include "uds-remote-store.hh"

namespace nix {

Expand All @@ -20,4 +17,3 @@ TEST(UDSRemoteStore, constructConfigWrongScheme)
}

} // namespace nix
#endif

0 comments on commit de1ec5a

Please sign in to comment.