-
Notifications
You must be signed in to change notification settings - Fork 272
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
Update fmt to v11.0.2 #1457
Merged
Merged
Update fmt to v11.0.2 #1457
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@microsoft-github-policy-service agree |
This comment was marked as resolved.
This comment was marked as resolved.
tchaikov
force-pushed
the
fmt-11
branch
7 times, most recently
from
July 18, 2024 13:04
ab84486
to
c15a1d3
Compare
in fmt 11, fmt/ranges.h tries to format sequence-like containers as a sequence. but we already have a specialization for `StringView`, this confuses compiler: ``` /usr/bin/g++ -DFMT_SHARED -DVCPKG_BASE_VERSION=2024-06-10 -DVCPKG_VERSION=2.fc41 -D_FILE_OFFSET_BITS=64 -I/builddir/build/BUILD/vcpkg-2024.06.10-build/vcpkg-tool-2024-06-10/include -I/builddir/build/BUILD/vcpkg-2024.06.10-build/vcpkg-tool-2024-06-10/redhat-linux-build/_cmrc/include -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DNDEBUG -std=c++17 -MD -MT CMakeFiles/vcpkg.dir/src/vcpkg.cpp.o -MF CMakeFiles/vcpkg.dir/src/vcpkg.cpp.o.d -o CMakeFiles/vcpkg.dir/src/vcpkg.cpp.o -c /builddir/build/BUILD/vcpkg-2024.06.10-build/vcpkg-tool-2024-06-10/src/vcpkg.cpp In file included from /usr/include/c++/14/bits/char_traits.h:50, from /usr/include/c++/14/string:42, from /builddir/build/BUILD/vcpkg-2024.06.10-build/vcpkg-tool-2024-06-10/include/vcpkg/base/lineinfo.h:5, from /builddir/build/BUILD/vcpkg-2024.06.10-build/vcpkg-tool-2024-06-10/include/vcpkg/base/checks.h:3, from /builddir/build/BUILD/vcpkg-2024.06.10-build/vcpkg-tool-2024-06-10/include/vcpkg/base/optional.h:5, from /builddir/build/BUILD/vcpkg-2024.06.10-build/vcpkg-tool-2024-06-10/include/vcpkg/base/chrono.h:5, from /builddir/build/BUILD/vcpkg-2024.06.10-build/vcpkg-tool-2024-06-10/src/vcpkg.cpp:3: /usr/include/c++/14/type_traits: In substitution of ‘template<class _Tp, class ... _Args> using std::__is_constructible_impl = std::__bool_constant<__is_constructible(_Tp, _Args ...)> [with _Tp = fmt::v11::formatter<vcpkg::StringView, char, void>; _Args = {}]’: /usr/include/c++/14/type_traits:1115:12: required from ‘struct std::is_constructible<fmt::v11::formatter<vcpkg::StringView, char, void> >’ 1115 | struct is_constructible | ^~~~~~~~~~~~~~~~ /usr/include/fmt/base.h:1509:66: required from ‘struct fmt::v11::detail::arg_mapper<fmt::v11::context>::formattable<const vcpkg::StringView, vcpkg::StringView>’ 1509 | (has_formatter<U, Context>::value && | ^~~~~ /usr/include/fmt/base.h:1516:25: required by substitution of ‘template<class T, typename std::enable_if<(! fmt::v11::detail::arg_mapper<fmt::v11::context>::formattable<T, typename std::remove_const<_Tp>::type>::value), int>::type <anonymous> > constexpr fmt::v11::detail::unformattable fmt::v11::detail::arg_mapper<fmt::v11::context>::do_map(T&) [with T = const vcpkg::StringView; typename std::enable_if<(! fmt::v11::detail::arg_mapper<fmt::v11::context>::formattable<T, typename std::remove_const<_Tp>::type>::value), int>::type <anonymous> = <missing>]’ 1516 | template <typename T, FMT_ENABLE_IF(!formattable<T>::value)> | ^ /usr/include/fmt/base.h:1529:68: required by substitution of ‘template<class T, class U, typename std::enable_if<((((((((std::is_class<U>::value || std::is_enum<_Tp2>::value) || std::is_union<U>::value) || std::is_fundamental<U>::value) && (! fmt::v11::detail::has_to_string_view<U, void>::value)) && (! fmt::v11::is_char<U>::value)) && (! fmt::v11::detail::is_named_arg<T>::value)) && (! std::is_integral<_Size>::value)) && (! std::is_arithmetic<typename fmt::v11::detail::format_as_result<U>::type>::value)), int>::type <anonymous> > constexpr decltype (((fmt::v11::detail::arg_mapper<fmt::v11::context>*)this)->fmt::v11::detail::arg_mapper<fmt::v11::context>::do_map(val)) fmt::v11::detail::arg_mapper<fmt::v11::context>::map(T&) [with T = const vcpkg::StringView; U = vcpkg::StringView; typename std::enable_if<((((((((std::is_class<U>::value || std::is_enum<_Tp2>::value) || std::is_union<U>::value) || std::is_fundamental<U>::value) && (! fmt::v11::detail::has_to_string_view<U, void>::value)) && (! fmt::v11::is_char<U>::value)) && (! fmt::v11::detail::is_named_arg<T>::value)) && (! std::is_integral<_Size>::value)) && (! std::is_arithmetic<typename fmt::v11::detail::format_as_result<U>::type>::value)), int>::type <anonymous> = 0]’ 1529 | FMT_MAP_API auto map(T& val) -> decltype(FMT_DECLTYPE_THIS do_map(val)) { | ~~~~~~^~~~~ /usr/include/fmt/base.h:1545:53: required by substitution of ‘template<class T, class Context> using fmt::v11::detail::mapped_type_constant = fmt::v11::detail::type_constant<decltype (fmt::v11::detail::arg_mapper<Context>().map(declval<const T&>())), typename Context::char_type> [with T = vcpkg::StringView; Context = fmt::v11::context]’ 1545 | type_constant<decltype(arg_mapper<Context>().map(std::declval<const T&>())), | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/fmt/base.h:1584:68: required from ‘constexpr long long unsigned int fmt::v11::detail::encode_types() [with Context = fmt::v11::context; Arg = vcpkg::StringView; Args = {}]’ 1584 | return static_cast<unsigned>(mapped_type_constant<Arg, Context>::value) | | ^~~~~ /usr/include/fmt/base.h:1590:67: required from ‘constexpr long long unsigned int fmt::v11::detail::make_descriptor() [with Context = fmt::v11::context; T = {vcpkg::StringView}; long unsigned int NUM_ARGS = 1]’ 1590 | return NUM_ARGS <= max_packed_args ? encode_types<Context, T...>() | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ /usr/include/fmt/base.h:2011:53: required by substitution of ‘template<class Context, class ... T, long unsigned int NUM_NAMED_ARGS, long long unsigned int DESC, typename std::enable_if<(NUM_NAMED_ARGS != 0), int>::type <anonymous> > constexpr fmt::v11::detail::format_arg_store<Context, sizeof... (T), NUM_NAMED_ARGS, DESC> fmt::v11::make_format_args(T& ...) [with Context = fmt::v11::context; T = {vcpkg::StringView}; long unsigned int NUM_NAMED_ARGS = 0; long long unsigned int DESC = <missing>; typename std::enable_if<(NUM_NAMED_ARGS != 0), int>::type <anonymous> = <missing>]’ 2011 | detail::make_descriptor<Context, T...>() | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ /usr/include/fmt/format.h:4357:44: required from ‘std::string fmt::v11::format(format_string<T ...>, T&& ...) [with T = {vcpkg::StringView&}; std::string = std::__cxx11::basic_string<char>; format_string<T ...> = basic_format_string<char, vcpkg::StringView&>]’ 4357 | return vformat(fmt, fmt::make_format_args(args...)); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ /builddir/build/BUILD/vcpkg-2024.06.10-build/vcpkg-tool-2024-06-10/include/vcpkg/base/json.h:256:65: required from here 256 | Checks::unreachable(VCPKG_LINE_INFO, fmt::format("JSON object missing key {}", key)); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/type_traits:1110:25: error: ambiguous template instantiation for ‘struct fmt::v11::formatter<vcpkg::StringView, char, void>’ 1110 | = __bool_constant<__is_constructible(_Tp, _Args...)>; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /builddir/build/BUILD/vcpkg-2024.06.10-build/vcpkg-tool-2024-06-10/include/vcpkg/base/fmt.h:17, from /builddir/build/BUILD/vcpkg-2024.06.10-build/vcpkg-tool-2024-06-10/include/vcpkg/base/messages.h:5, from /builddir/build/BUILD/vcpkg-2024.06.10-build/vcpkg-tool-2024-06-10/include/vcpkg/base/checks.h:4: /usr/include/fmt/ranges.h:517:8: note: candidates are: ‘template<class R, class Char> struct fmt::v11::formatter<R, Char, typename std::enable_if<fmt::v11::conjunction<std::integral_constant<bool, ((((fmt::v11::range_format_kind<R, Char, void>::value != fmt::v11::range_format::disabled) && (fmt::v11::range_format_kind<R, Char, void>::value != fmt::v11::range_format::map)) && (fmt::v11::range_format_kind<R, Char, void>::value != fmt::v11::range_format::string)) && (fmt::v11::range_format_kind<R, Char, void>::value != fmt::v11::range_format::debug_string))>, fmt::v11::detail::is_formattable_delayed<R, Char> >::value, void>::type> [with R = vcpkg::StringView; Char = char]’ 517 | struct formatter< | ^~~~~~~~~~ 518 | R, Char, | ~~~~~~~~ 519 | enable_if_t<conjunction< | ~~~~~~~~~~~~~~~~~~~~~~~~ 520 | bool_constant< | ~~~~~~~~~~~~~~ 521 | range_format_kind<R, Char>::value != range_format::disabled && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | range_format_kind<R, Char>::value != range_format::map && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 523 | range_format_kind<R, Char>::value != range_format::string && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 524 | range_format_kind<R, Char>::value != range_format::debug_string> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 525 | // Workaround a bug in MSVC 2015 and earlier. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 526 | #if !FMT_MSC_VERSION || FMT_MSC_VERSION >= 1910 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 527 | , | ~ 528 | detail::is_formattable_delayed<R, Char> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 529 | #endif | ~~~~~~ 530 | >::value>> { | ~~~~~~~~~~ ``` so in order to disambiguate the resolution, let's explicitly disable the range formatter. Fixes microsoft/vcpkg#39946 Signed-off-by: Kefu Chai <tchaikov@gmail.com>
fmt::join() was moved into fmt/ranges.h in fmt 11, so let's include this header file for using it. Fixes microsoft/vcpkg#39946 Signed-off-by: Kefu Chai <tchaikov@gmail.com>
@WangWeiLin-MV in case you are interested. |
BillyONeal
approved these changes
Jul 23, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this changeset fixes the build with fmt 11: