Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Support fmt 11 #3368

Merged
merged 2 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libmamba/include/mamba/download/mirror.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define MAMBA_DOWNLOAD_MIRROR_HPP

#include <functional>
#include <memory>
#include <mutex>
#include <optional>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion libmamba/include/mamba/fs/filesystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ struct fmt::formatter<::mamba::fs::u8path>
}

template <class FormatContext>
auto format(const ::mamba::fs::u8path& path, FormatContext& ctx)
auto format(const ::mamba::fs::u8path& path, FormatContext& ctx) const
{
return fmt::format_to(ctx.out(), "'{}'", path.string());
}
Expand Down
6 changes: 3 additions & 3 deletions libmamba/include/mamba/specs/build_number_spec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ struct fmt::formatter<mamba::specs::BuildNumberPredicate>
{
auto parse(format_parse_context& ctx) -> decltype(ctx.begin());

auto format(const ::mamba::specs::BuildNumberPredicate& pred, format_context& ctx)
auto format(const ::mamba::specs::BuildNumberPredicate& pred, format_context& ctx) const
-> decltype(ctx.out());
};

Expand All @@ -163,8 +163,8 @@ struct fmt::formatter<mamba::specs::BuildNumberSpec>
{
auto parse(format_parse_context& ctx) -> decltype(ctx.begin());

auto
format(const ::mamba::specs::BuildNumberSpec& spec, format_context& ctx) -> decltype(ctx.out());
auto format(const ::mamba::specs::BuildNumberSpec& spec, format_context& ctx) const
-> decltype(ctx.out());
};

template <>
Expand Down
4 changes: 2 additions & 2 deletions libmamba/include/mamba/specs/chimera_string_spec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ struct fmt::formatter<mamba::specs::ChimeraStringSpec>
{
auto parse(format_parse_context& ctx) -> decltype(ctx.begin());

auto
format(const ::mamba::specs::ChimeraStringSpec& spec, format_context& ctx) -> decltype(ctx.out());
auto format(const ::mamba::specs::ChimeraStringSpec& spec, format_context& ctx) const
-> decltype(ctx.out());
};

template <>
Expand Down
3 changes: 2 additions & 1 deletion libmamba/include/mamba/specs/glob_spec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ struct fmt::formatter<mamba::specs::GlobSpec>
{
auto parse(format_parse_context& ctx) -> decltype(ctx.begin());

auto format(const ::mamba::specs::GlobSpec& spec, format_context& ctx) -> decltype(ctx.out());
auto
format(const ::mamba::specs::GlobSpec& spec, format_context& ctx) const -> decltype(ctx.out());
};

template <>
Expand Down
3 changes: 2 additions & 1 deletion libmamba/include/mamba/specs/match_spec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ struct fmt::formatter<::mamba::specs::MatchSpec>
{
auto parse(format_parse_context& ctx) -> decltype(ctx.begin());

auto format(const ::mamba::specs::MatchSpec& spec, format_context& ctx) -> decltype(ctx.out());
auto
format(const ::mamba::specs::MatchSpec& spec, format_context& ctx) const -> decltype(ctx.out());
};

/*********************************
Expand Down
3 changes: 2 additions & 1 deletion libmamba/include/mamba/specs/regex_spec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ struct fmt::formatter<mamba::specs::RegexSpec>
{
auto parse(format_parse_context& ctx) -> decltype(ctx.begin());

auto format(const ::mamba::specs::RegexSpec& spec, format_context& ctx) -> decltype(ctx.out());
auto
format(const ::mamba::specs::RegexSpec& spec, format_context& ctx) const -> decltype(ctx.out());
};

#endif
6 changes: 3 additions & 3 deletions libmamba/include/mamba/specs/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ struct fmt::formatter<mamba::specs::VersionPartAtom>
{
auto parse(format_parse_context& ctx) -> decltype(ctx.begin());

auto
format(const ::mamba::specs::VersionPartAtom atom, format_context& ctx) -> decltype(ctx.out());
auto format(const ::mamba::specs::VersionPartAtom atom, format_context& ctx) const
-> decltype(ctx.out());
};

template <>
Expand All @@ -188,7 +188,7 @@ struct fmt::formatter<mamba::specs::Version>

auto parse(format_parse_context& ctx) -> decltype(ctx.begin());

auto format(const ::mamba::specs::Version v, format_context& ctx) -> decltype(ctx.out());
auto format(const ::mamba::specs::Version v, format_context& ctx) const -> decltype(ctx.out());
};

#endif
7 changes: 4 additions & 3 deletions libmamba/include/mamba/specs/version_spec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ struct fmt::formatter<mamba::specs::VersionPredicate>

auto parse(format_parse_context& ctx) -> decltype(ctx.begin());

auto
format(const ::mamba::specs::VersionPredicate& pred, format_context& ctx) -> decltype(ctx.out());
auto format(const ::mamba::specs::VersionPredicate& pred, format_context& ctx) const
-> decltype(ctx.out());
};

template <>
Expand All @@ -243,7 +243,8 @@ struct fmt::formatter<mamba::specs::VersionSpec>

auto parse(format_parse_context& ctx) -> decltype(ctx.begin());

auto format(const ::mamba::specs::VersionSpec& spec, format_context& ctx) -> decltype(ctx.out());
auto
format(const ::mamba::specs::VersionSpec& spec, format_context& ctx) const -> decltype(ctx.out());
};

template <>
Expand Down
1 change: 1 addition & 0 deletions libmamba/src/api/install.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <fmt/color.h>
#include <fmt/format.h>
#include <fmt/ostream.h>
#include <fmt/ranges.h>
#include <reproc++/run.hpp>
#include <reproc/reproc.h>

Expand Down
2 changes: 1 addition & 1 deletion libmamba/src/core/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include <iostream>

#include <fmt/format.h>
#include <fmt/ostream.h>
#include <fmt/ranges.h>
#include <spdlog/pattern_formatter.h>
#include <spdlog/sinks/stdout_color_sinks.h>
#include <spdlog/spdlog.h>
Expand Down
1 change: 1 addition & 0 deletions libmamba/src/core/query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <fmt/color.h>
#include <fmt/format.h>
#include <fmt/ostream.h>
#include <fmt/ranges.h>

#include "mamba/core/context.hpp"
#include "mamba/core/output.hpp"
Expand Down
1 change: 1 addition & 0 deletions libmamba/src/core/run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ extern "C"
#include <fmt/color.h>
#include <fmt/format.h>
#include <fmt/ostream.h>
#include <fmt/ranges.h>
#include <nlohmann/json.hpp>
#include <reproc++/run.hpp>
#include <spdlog/spdlog.h>
Expand Down
1 change: 1 addition & 0 deletions libmamba/src/solver/libsolv/unsolvable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <string>
#include <vector>

#include <fmt/ranges.h>
#include <solv/problems.h>
#include <solv/solver.h>

Expand Down
4 changes: 2 additions & 2 deletions libmamba/src/specs/build_number_spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ auto
fmt::formatter<mamba::specs::BuildNumberPredicate>::format(
const ::mamba::specs::BuildNumberPredicate& pred,
format_context& ctx
) -> decltype(ctx.out())
) const -> decltype(ctx.out())
{
using BuildNumberPredicate = typename mamba::specs::BuildNumberPredicate;
using BuildNumber = typename BuildNumberPredicate::BuildNumber;
Expand Down Expand Up @@ -268,7 +268,7 @@ auto
fmt::formatter<mamba::specs::BuildNumberSpec>::format(
const ::mamba::specs::BuildNumberSpec& spec,
format_context& ctx
) -> decltype(ctx.out())
) const -> decltype(ctx.out())
{
return fmt::format_to(ctx.out(), "{}", spec.m_predicate);
}
2 changes: 1 addition & 1 deletion libmamba/src/specs/chimera_string_spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ auto
fmt::formatter<mamba::specs::ChimeraStringSpec>::format(
const ::mamba::specs::ChimeraStringSpec& spec,
format_context& ctx
) -> decltype(ctx.out())
) const -> decltype(ctx.out())
{
return fmt::format_to(ctx.out(), "{}", spec.str());
}
6 changes: 4 additions & 2 deletions libmamba/src/specs/glob_spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ fmt::formatter<mamba::specs::GlobSpec>::parse(format_parse_context& ctx) -> decl
}

auto
fmt::formatter<mamba::specs::GlobSpec>::format(const ::mamba::specs::GlobSpec& spec, format_context& ctx)
-> decltype(ctx.out())
fmt::formatter<mamba::specs::GlobSpec>::format(
const ::mamba::specs::GlobSpec& spec,
format_context& ctx
) const -> decltype(ctx.out())
{
return fmt::format_to(ctx.out(), "{}", spec.str());
}
3 changes: 2 additions & 1 deletion libmamba/src/specs/match_spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <tuple>

#include <fmt/format.h>
#include <fmt/ranges.h>

#include "mamba/specs/archive.hpp"
#include "mamba/specs/match_spec.hpp"
Expand Down Expand Up @@ -1069,7 +1070,7 @@ auto
fmt::formatter<::mamba::specs::MatchSpec>::format(
const ::mamba::specs::MatchSpec& spec,
format_context& ctx
) -> decltype(ctx.out())
) const -> decltype(ctx.out())
{
using MatchSpec = ::mamba::specs::MatchSpec;

Expand Down
1 change: 1 addition & 0 deletions libmamba/src/specs/package_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include <fmt/core.h>
#include <fmt/format.h>
#include <fmt/ranges.h>
#include <nlohmann/json.hpp>

#include "mamba/specs/archive.hpp"
Expand Down
2 changes: 1 addition & 1 deletion libmamba/src/specs/regex_spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ auto
fmt::formatter<mamba::specs::RegexSpec>::format(
const ::mamba::specs::RegexSpec& spec,
format_context& ctx
) -> decltype(ctx.out())
) const -> decltype(ctx.out())
{
return fmt::format_to(ctx.out(), "{}", spec.str());
}
1 change: 1 addition & 0 deletions libmamba/src/specs/unresolved_channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <utility>

#include <fmt/format.h>
#include <fmt/ranges.h>

#include "mamba/fs/filesystem.hpp"
#include "mamba/specs/archive.hpp"
Expand Down
4 changes: 2 additions & 2 deletions libmamba/src/specs/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ auto
fmt::formatter<mamba::specs::VersionPartAtom>::format(
const ::mamba::specs::VersionPartAtom atom,
format_context& ctx
) -> decltype(ctx.out())
) const -> decltype(ctx.out())
{
return fmt::format_to(ctx.out(), "{}{}", atom.numeral(), atom.literal());
}
Expand Down Expand Up @@ -792,7 +792,7 @@ fmt::formatter<mamba::specs::Version>::parse(format_parse_context& ctx) -> declt

auto
fmt::formatter<mamba::specs::Version>::format(const ::mamba::specs::Version v, format_context& ctx)
-> decltype(ctx.out())
const -> decltype(ctx.out())
{
auto out = ctx.out();
if (v.epoch() != 0)
Expand Down
4 changes: 2 additions & 2 deletions libmamba/src/specs/version_spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ auto
fmt::formatter<mamba::specs::VersionPredicate>::format(
const ::mamba::specs::VersionPredicate& pred,
format_context& ctx
) -> decltype(ctx.out())
) const -> decltype(ctx.out())
{
using VersionPredicate = typename mamba::specs::VersionPredicate;
using VersionSpec = typename mamba::specs::VersionSpec;
Expand Down Expand Up @@ -589,7 +589,7 @@ auto
fmt::formatter<mamba::specs::VersionSpec>::format(
const ::mamba::specs::VersionSpec& spec,
format_context& ctx
) -> decltype(ctx.out())
) const -> decltype(ctx.out())
{
using VersionSpec = typename mamba::specs::VersionSpec;

Expand Down
1 change: 1 addition & 0 deletions libmamba/src/util/os_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <string>

#include <fmt/format.h>
#include <fmt/ranges.h>
#include <reproc++/run.hpp>

#include "mamba/util/environment.hpp"
Expand Down
1 change: 1 addition & 0 deletions micromamba/src/run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <fmt/color.h>
#include <fmt/format.h>
#include <fmt/ranges.h>
#include <nlohmann/json.hpp>
#include <reproc++/run.hpp>
#include <spdlog/spdlog.h>
Expand Down
Loading