-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix building transmission with C++23 #6832
base: main
Are you sure you want to change the base?
Conversation
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.
Is this exhaustive? I haven't tried, but translatable strings wrapped in _()
probably needs fmt::runtime()
too.
As I said, I haven't touched UI code in gtk/ and qt/ Only libtransmission and cli are updated |
There are a bunch of translatable strings in libtransmission too. For example: transmission/libtransmission/announcer-http.cc Lines 438 to 443 in 6c1cee5
|
My bad, I don't have We can merge this one as it is, and I will fix other issues in later PRs with the help of my Linux machine. |
I'd say do it in one go, but you decide whatever works for you :) |
How are we guaranteeing that this won't break tomorrow, given that we're still on C++17? |
I can add workflow for that, but it must be optional for now. I convert this PR to draft and will add more fixes while thinking how to check this on CI. |
7931ac3
to
bb2feaa
Compare
@tearfur You were right, I missed a lot of issues with fmt strings on the first iteration. |
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.
Nice that you have made the changes to qt and gtk too!
1028e5b
to
1d9ac88
Compare
Fixes build error with C++20/C++23 error: return type 'auto' of selected 'operator==' function for rewritten '!=' comparison is not 'bool' Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
Fixes building with C++20/C++23 error: no matching function for call to 'size' function 'size' with deduced return type cannot be used before it is defined Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
fmt::format_string ctor is consteval with C++20 See fmtlib/fmt#2438 Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
1d9ac88
to
3676a8c
Compare
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.
Overall looks quite intrusive. Since we moved away from FMT_STRING()
(or whatever it was called) some time ago, which was intrusive as well, I wonder if there's an option in libfmt to differentiate automatically based on the type of argument being either char const*
or char const[N]
...
@ckerr, anything specific you had in mind when adding needs update
label other than syncing the PR with current main
to resolve conflicts?
@@ -990,3 +990,80 @@ jobs: | |||
working-directory: ./android | |||
run: | | |||
gradle build | |||
|
|||
ubuntu-24-04-from-tarball-cxx-23: |
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.
Nit: I think we have enough from-tarball
configurations as is, since this one doesn't exactly need to prove that it builds specifically from a tarball we can speed feedback up by building from git clone instead to not block on tarball generation job.
No description provided.