From e0c00ab513b268568727c1d12f5e4d497bc419bd Mon Sep 17 00:00:00 2001 From: Hind Montassif Date: Mon, 2 Sep 2024 15:59:37 +0200 Subject: [PATCH 1/5] Fix linter --- libmamba/include/mamba/version.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libmamba/include/mamba/version.hpp b/libmamba/include/mamba/version.hpp index 7993f8d84b..ce249040da 100644 --- a/libmamba/include/mamba/version.hpp +++ b/libmamba/include/mamba/version.hpp @@ -26,8 +26,7 @@ (LIBMAMBA_VERSION_MAJOR * 10000 + LIBMAMBA_VERSION_MINOR * 100 + LIBMAMBA_VERSION_PATCH) #define LIBMAMBA_VERSION_STRING \ __LIBMAMBA_STRINGIZE(LIBMAMBA_VERSION_MAJOR) \ - "." __LIBMAMBA_STRINGIZE(LIBMAMBA_VERSION_MINOR) "." __LIBMAMBA_STRINGIZE( \ - LIBMAMBA_VERSION_PATCH) + "." __LIBMAMBA_STRINGIZE(LIBMAMBA_VERSION_MINOR) "." __LIBMAMBA_STRINGIZE(LIBMAMBA_VERSION_PATCH) namespace mamba { From 612d02707a7700bd9601a5d2fbe50a52780960a4 Mon Sep 17 00:00:00 2001 From: Hind Montassif Date: Mon, 2 Sep 2024 15:57:43 +0200 Subject: [PATCH 2/5] Remove constraint on fmt --- libmamba/environment-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmamba/environment-dev.yml b/libmamba/environment-dev.yml index ea2b2d5d99..615f10e839 100644 --- a/libmamba/environment-dev.yml +++ b/libmamba/environment-dev.yml @@ -16,5 +16,5 @@ dependencies: - yaml-cpp >=0.8.0 - cli11 >=2.2 - spdlog - - fmt < 11 # TODO remove constraint when backporting the fix for fmt last release (from mamba main branch) + - fmt - sel(win): winreg From 13caae87113d9349071b92f1373bd2b9db204a89 Mon Sep 17 00:00:00 2001 From: Julien Jerphanion Date: Mon, 29 Jul 2024 16:28:56 +0200 Subject: [PATCH 3/5] Backport fmt 11 support from main --- libmamba/include/mamba/core/mamba_fs.hpp | 2 +- libmamba/include/mamba/specs/version.hpp | 4 ++-- libmamba/src/api/install.cpp | 1 + libmamba/src/core/context.cpp | 2 +- libmamba/src/core/package_info.cpp | 1 + libmamba/src/core/query.cpp | 1 + libmamba/src/core/run.cpp | 1 + libmamba/tests/src/core/test_satisfiability_error.cpp | 1 + libmamba/tests/src/doctest-printer/array.hpp | 1 + libmamba/tests/src/doctest-printer/vector.hpp | 1 + libmambapy/src/main.cpp | 1 + micromamba/src/run.cpp | 1 + 12 files changed, 13 insertions(+), 4 deletions(-) diff --git a/libmamba/include/mamba/core/mamba_fs.hpp b/libmamba/include/mamba/core/mamba_fs.hpp index 65c515c890..0f158a8e1b 100644 --- a/libmamba/include/mamba/core/mamba_fs.hpp +++ b/libmamba/include/mamba/core/mamba_fs.hpp @@ -1379,7 +1379,7 @@ struct fmt::formatter<::fs::u8path> } template - auto format(const ::fs::u8path& path, FormatContext& ctx) + auto format(const ::fs::u8path& path, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "'{}'", path.string()); } diff --git a/libmamba/include/mamba/specs/version.hpp b/libmamba/include/mamba/specs/version.hpp index 4272f18fa4..cf69cd4211 100644 --- a/libmamba/include/mamba/specs/version.hpp +++ b/libmamba/include/mamba/specs/version.hpp @@ -168,7 +168,7 @@ struct fmt::formatter } template - auto format(const ::mamba::specs::VersionPartAtom atom, FormatContext& ctx) + auto format(const ::mamba::specs::VersionPartAtom atom, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{}{}", atom.numeral(), atom.literal()); } @@ -188,7 +188,7 @@ struct fmt::formatter } template - auto format(const ::mamba::specs::Version v, FormatContext& ctx) + auto format(const ::mamba::specs::Version v, FormatContext& ctx) const { auto out = ctx.out(); if (v.epoch() != 0) diff --git a/libmamba/src/api/install.cpp b/libmamba/src/api/install.cpp index c749b24e6a..672ee29eda 100644 --- a/libmamba/src/api/install.cpp +++ b/libmamba/src/api/install.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/libmamba/src/core/context.cpp b/libmamba/src/core/context.cpp index 5d1b65bca8..c8b87054bd 100644 --- a/libmamba/src/core/context.cpp +++ b/libmamba/src/core/context.cpp @@ -6,8 +6,8 @@ #include -#include #include +#include #include #include #include diff --git a/libmamba/src/core/package_info.cpp b/libmamba/src/core/package_info.cpp index 00d80e8579..8726d1c0b3 100644 --- a/libmamba/src/core/package_info.cpp +++ b/libmamba/src/core/package_info.cpp @@ -11,6 +11,7 @@ #include #include +#include #include "mamba/core/package_info.hpp" #include "mamba/specs/archive.hpp" diff --git a/libmamba/src/core/query.cpp b/libmamba/src/core/query.cpp index d1ac04c6e0..017522ae62 100644 --- a/libmamba/src/core/query.cpp +++ b/libmamba/src/core/query.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include diff --git a/libmamba/src/core/run.cpp b/libmamba/src/core/run.cpp index ec84ed53d6..5584cf5958 100644 --- a/libmamba/src/core/run.cpp +++ b/libmamba/src/core/run.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/libmamba/tests/src/core/test_satisfiability_error.cpp b/libmamba/tests/src/core/test_satisfiability_error.cpp index bb3372461d..081367b197 100644 --- a/libmamba/tests/src/core/test_satisfiability_error.cpp +++ b/libmamba/tests/src/core/test_satisfiability_error.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include diff --git a/libmamba/tests/src/doctest-printer/array.hpp b/libmamba/tests/src/doctest-printer/array.hpp index 123ffff927..6b544689b0 100644 --- a/libmamba/tests/src/doctest-printer/array.hpp +++ b/libmamba/tests/src/doctest-printer/array.hpp @@ -8,6 +8,7 @@ #include #include +#include namespace doctest { diff --git a/libmamba/tests/src/doctest-printer/vector.hpp b/libmamba/tests/src/doctest-printer/vector.hpp index 0eb5cf0424..b397f9e651 100644 --- a/libmamba/tests/src/doctest-printer/vector.hpp +++ b/libmamba/tests/src/doctest-printer/vector.hpp @@ -8,6 +8,7 @@ #include #include +#include namespace doctest { diff --git a/libmambapy/src/main.cpp b/libmambapy/src/main.cpp index 94d38ce522..0e82ad8a6c 100644 --- a/libmambapy/src/main.cpp +++ b/libmambapy/src/main.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/micromamba/src/run.cpp b/micromamba/src/run.cpp index c3af4eacf0..7c561aff0a 100644 --- a/micromamba/src/run.cpp +++ b/micromamba/src/run.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include #include From e9e3089c0cc116a2af6964e53fe00d27670b66b9 Mon Sep 17 00:00:00 2001 From: Hind Montassif Date: Wed, 4 Sep 2024 15:38:35 +0200 Subject: [PATCH 4/5] Add missing header --- libmamba/tests/src/specs/test_version.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libmamba/tests/src/specs/test_version.cpp b/libmamba/tests/src/specs/test_version.cpp index d22a78b303..2ca0d4c4f6 100644 --- a/libmamba/tests/src/specs/test_version.cpp +++ b/libmamba/tests/src/specs/test_version.cpp @@ -11,6 +11,7 @@ #include #include +#include #include "mamba/specs/version.hpp" From f4779f81c46cdfe07419c58660352504466a1349 Mon Sep 17 00:00:00 2001 From: Hind Montassif Date: Wed, 4 Sep 2024 17:03:15 +0200 Subject: [PATCH 5/5] Try removing upper bound on fmt --- micromamba/environment-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micromamba/environment-dev.yml b/micromamba/environment-dev.yml index a094512e71..28298c8e40 100644 --- a/micromamba/environment-dev.yml +++ b/micromamba/environment-dev.yml @@ -23,6 +23,6 @@ dependencies: - conda-package-handling - pyyaml - spdlog - - fmt <10 + - fmt - sel(win): winreg - sel(win): pywin32