fmtlib / fmt

A modern formatting library
https://fmt.dev
Other
19.9k stars 2.43k forks source link

Building a GTK app with 11.0.1 #4052

Closed GaryElshaw closed 1 week ago

GaryElshaw commented 1 week ago

All of the various Transmission clients are compiling fine with the exception of GTK. Any help would be appreciated.

image

vitaut commented 1 week ago

As the error says, mixing character (code unit) types is disallowed in {fmt}. In this case the format string is a char string and action_name is a Glib::ustring which uses a different code unit type. To fix this you'll need provide conversion from one to the other or a formatter that does the conversion.

GaryElshaw commented 1 week ago

Is there a change i can report back to the team for future reference? All previous versions of fmt have been working fine.

vitaut commented 1 week ago

Reopening to investigate further since it worked in an earlier version. Could you provide a repro?

vitaut commented 1 week ago

I managed to repro the issue: https://www.godbolt.org/z/cqdMPn6aP. The problem is that ustring is incorrectly detected as as std::string.

Coeur commented 1 week ago

Testing commit by commit, the build regression came exactly with 800a0bb23f0bb45bfabecb4236bd1a3f40f9632d by Viktor Zverovich on January 4, 2024.

GaryElshaw commented 1 week ago

@vitaut Is this a change you think Transmission needs to address, or something for fmt to look at?

vitaut commented 1 week ago

It's a bug in {fmt}, we shouldn't treat ustring as std::string. I'll submit a fix.

GaryElshaw commented 1 week ago

Thank you!

vitaut commented 1 week ago

Should be fixed in https://github.com/fmtlib/fmt/commit/7a8b54a0ef7ca1791b0a5491b6e0593e1cf2dd5e. Could you verify it?

Coeur commented 1 week ago

Verified successful. Thank you. Sorry for only pointing this out after the 11.0.1 release instead of before.