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

commit b79ed41 regressed spdlog build #3090

Closed
tycho opened this issue Sep 10, 2022 · 2 comments
Closed

commit b79ed41 regressed spdlog build #3090

tycho opened this issue Sep 10, 2022 · 2 comments

Comments

@tycho
Copy link

tycho commented Sep 10, 2022

I just did a rebase of my project, including latest upstream fmt and spdlog (the latter uses fmt). It appears that fmt broke compatibility with spdlog somehow, but my C++ template-fu is weak and I'm not sure what the error message is trying to tell me exactly:

In file included from code/app.cpp:1:
In file included from code/lib/universal_include.h:450:
In file included from /Users/steven/Development/game/contrib/spdlog/include/spdlog/spdlog.h:14:
/Users/steven/Development/game/contrib/spdlog/include/spdlog/logger.h:375:13: error: no matching function for call to 'vformat_to'
            fmt::detail::vformat_to(buf, fmt, fmt::make_format_args(std::forward<Args>(args)...));
            ^~~~~~~~~~~~~~~~~~~~~~~
/Users/steven/Development/game/contrib/spdlog/include/spdlog/logger.h:90:9: note: in instantiation of function template specialization 'spdlog::logger::log_<const char *>' requested here
        log_(loc, lvl, fmt, std::forward<Args>(args)...);
        ^
code/app.cpp:114:2: note: in instantiation of function template specialization 'spdlog::logger::log<const char *>' requested here
        SPDLOG_LOGGER_INFO(s_logApp, "Version: {}", Game::Version::AnnotatedVersion());
        ^
/Users/steven/Development/game/contrib/spdlog/include/spdlog/spdlog.h:318:45: note: expanded from macro 'SPDLOG_LOGGER_INFO'
#    define SPDLOG_LOGGER_INFO(logger, ...) SPDLOG_LOGGER_CALL(logger, spdlog::level::info, __VA_ARGS__)
                                            ^
/Users/steven/Development/game/contrib/spdlog/include/spdlog/spdlog.h:296:58: note: expanded from macro 'SPDLOG_LOGGER_CALL'
#define SPDLOG_LOGGER_CALL(logger, level, ...) (logger)->log(spdlog::source_loc{__FILE__, __LINE__, SPDLOG_FUNCTION}, level, __VA_ARGS__)
                                                         ^
/Users/steven/Development/game/build/game.x86_64-clang-macos-x86_64-debug/contrib/include/fmt/format.h:4120:6: note: candidate template ignored: could not match 'basic_format_args' against 'format_arg_store'
void vformat_to(buffer<Char>& buf, basic_string_view<Char> fmt,
     ^

git bisection blames commit b79ed41:

commit b79ed4105ab2ee268cfdf056aed5b7fb4c09dcb8
Author: Victor Zverovich <[email protected]>
Date:   Thu Sep 1 16:14:53 2022 -0700

    Remove unnecessary type_identity

Here's the bisection log:

$ git bisect log
# bad: [ecffca672656d6e4a2d39314237289f5740e8562] Don't parse '}' as fill
# good: [541cd218381493728241fcc690e8c362434a37ea] Fix locale name (thanks Mikhail Paulyshka)
git bisect start 'ecffca672656d6e4a2d39314237289f5740e8562' '541cd218381493728241fcc690e8c362434a37ea'
# good: [a07411c2b9c440ce0879deeb05774b19bdc48dd2] Disable compile-time checks for dynamic width/precision test for LCC and compiler without std::is_constant_evaluated()
git bisect good a07411c2b9c440ce0879deeb05774b19bdc48dd2
# bad: [f187274d3637403e1391deb69233b34b5e345d37] Add loc_value
git bisect bad f187274d3637403e1391deb69233b34b5e345d37
# bad: [48327a82e335fda96eb184602d84c562ddb372c2] Make format.h compile faster
git bisect bad 48327a82e335fda96eb184602d84c562ddb372c2
# good: [0b0f7cfbfcebd021c910078003d413354bd843e2] hip workaround
git bisect good 0b0f7cfbfcebd021c910078003d413354bd843e2
# bad: [b79ed4105ab2ee268cfdf056aed5b7fb4c09dcb8] Remove unnecessary type_identity
git bisect bad b79ed4105ab2ee268cfdf056aed5b7fb4c09dcb8
# good: [64e29893cfd3a603b79e38d75384e12336e8b980] Improve locale support
git bisect good 64e29893cfd3a603b79e38d75384e12336e8b980
# first bad commit: [b79ed4105ab2ee268cfdf056aed5b7fb4c09dcb8] Remove unnecessary type_identity

It reverts cleanly, which does unblock me, but I figured I should pass this along. Is this spdlog's bug, or fmt's?

@vitaut
Copy link
Contributor

vitaut commented Sep 10, 2022

Thanks for reporting but fmt::detail::vformat_to is an internal API and shouldn't be used. Please open an issue in spdlog.

@vitaut vitaut closed this as completed Sep 10, 2022
@tycho
Copy link
Author

tycho commented Sep 10, 2022

Thanks for reporting but fmt::detail::vformat_to is an internal API and shouldn't be used. Please open an issue in spdlog.

Thank you for the fast reply! I will do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants