From 902faf4fe5d0d0b8947f0001c66c4d67e5282e08 Mon Sep 17 00:00:00 2001 From: Farid Zakaria Date: Tue, 14 Oct 2025 23:20:35 -0400 Subject: [PATCH] More fixes for iwyu --- src/libflake/config.cc | 4 +--- src/libflake/flake.cc | 6 ++---- src/libflake/flakeref.cc | 15 +++++++++++++-- src/libflake/lockfile.cc | 2 -- src/libflake/url-name.cc | 2 ++ 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/libflake/config.cc b/src/libflake/config.cc index 08e6ff038..c248ed0a6 100644 --- a/src/libflake/config.cc +++ b/src/libflake/config.cc @@ -1,19 +1,17 @@ #include #include #include -#include -#include #include #include #include #include #include #include -#include #include #include #include #include +#include #include "nix/util/users.hh" #include "nix/util/config-global.hh" diff --git a/src/libflake/flake.cc b/src/libflake/flake.cc index ae93f2f39..8e7e2be26 100644 --- a/src/libflake/flake.cc +++ b/src/libflake/flake.cc @@ -3,8 +3,6 @@ #include #include #include -#include -#include #include #include #include @@ -12,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -20,6 +17,7 @@ #include #include #include +#include #include "nix/util/terminal.hh" #include "nix/util/ref.hh" @@ -909,7 +907,7 @@ static ref makeInternalFS() internalFS->setPathDisplay("«flakes-internal»", ""); internalFS->addFile( CanonPath("call-flake.nix"), -#include "call-flake.nix.gen.hh" +#include "call-flake.nix.gen.hh" // IWYU pragma: keep ); return internalFS; } diff --git a/src/libflake/flakeref.cc b/src/libflake/flakeref.cc index a3448c88d..b4a5c106e 100644 --- a/src/libflake/flakeref.cc +++ b/src/libflake/flakeref.cc @@ -1,12 +1,15 @@ #include #include #include -#include -#include #include #include #include #include +#include +#include +#include +#include +#include #include "nix/flake/flakeref.hh" #include "nix/util/url.hh" @@ -18,8 +21,16 @@ #include "nix/util/logging.hh" #include "nix/util/strings.hh" #include "nix/util/util.hh" +#include "nix/fetchers/attrs.hh" +#include "nix/fetchers/registry.hh" +#include "nix/store/outputs-spec.hh" +#include "nix/util/ref.hh" +#include "nix/util/types.hh" namespace nix { +class Store; +struct SourceAccessor; + namespace fetchers { struct Settings; } // namespace fetchers diff --git a/src/libflake/lockfile.cc b/src/libflake/lockfile.cc index 421f872cc..fbf17a383 100644 --- a/src/libflake/lockfile.cc +++ b/src/libflake/lockfile.cc @@ -1,8 +1,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/libflake/url-name.cc b/src/libflake/url-name.cc index a63b107c3..f4b5c6a7f 100644 --- a/src/libflake/url-name.cc +++ b/src/libflake/url-name.cc @@ -1,4 +1,6 @@ #include +#include +#include #include "nix/flake/url-name.hh" #include "nix/util/strings.hh"