-
Notifications
You must be signed in to change notification settings - Fork 608
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(deps): fmt 10.0 support #3836
Conversation
fmt 10.0 was recently released, and it breaks a lot for us because they have fully removed legacy support for automatically being able to format anything that has an iostream `<<` operator. This facility was deprecatd in 8.1 but could be re-enabled with FMT_DEPRECATED_OSTREAM, but even that was removed in 10.0. So this means that we had to write several explicit format handlers for some types for use with format() and print(). Also, they are even more strict with sprintf/printf which don't honor the custom formatters as far as I can tell, so in several cases I also switched those to the std::format/print style.
@@ -26,6 +26,7 @@ | |||
|
|||
// fmt 8.1 stopped automatically enabling formatting of anything that supports | |||
// ostream output. This breaks a lot! Re-enable this old behavior. | |||
// NOTE: fmt 10.0 removed this support entirely. |
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.
How old of a version of fmt do we need to support?
Would it be possible to drop the "deprecated ostream" macro here now that you've implemented the missing items?
If I've understood correctly, the formatter functionality is not actually new, its just that we didn't implement the formatters before, right ?
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.
I don't know how far back we "need" to support. I think we can drop some old releases (in master / 2.5-to-be), but I'm not sure how far to push forward.
I'd need to do some archeology on fmt itself to see how far back it fully supports the format extensions (maybe all the way back, I'm just not sure), and also make a judgment call about whether dropping that macro might break anything people depend on -- for example, if people are using any of the utilities in strutil.h such as OIIO::print, format, or debug (which all wrap the fmt functionality), might they be subtly depending on this macro when dealing with types with ostream adapters but no formatter templates?
I want this PR to be fully backportable to solve the immediate problem of fmt 10.0 breaking our build. Then we can separately tackle whether there is simplifications we can make in master but with some acceptable risk of breaking users of format/print if they haven't kept up with writing formatters.
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.
Makes sense. From my reading of the fmt release notes, the ostream_formatter which you are using here was only added in 9.0 (same time they deprecated the "automatic" <<
handling). So I guess this is the oldest version we can support.
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.
LGTM!
fmt 10.0 was recently released, and it breaks a lot for us because they have fully removed legacy support for automatically being able to format anything that has an iostream `<<` operator. This facility was deprecatd in 8.1 but could be re-enabled with FMT_DEPRECATED_OSTREAM, but even that was removed in 10.0. So this means that we had to write several explicit format handlers for some types for use with format() and print(). Also, they are even more strict with sprintf/printf which don't honor the custom formatters as far as I can tell, so in several cases I also switched those to the std::format/print style. Fixes AcademySoftwareFoundation#3835
fmt 10.0 was recently released, and it breaks a lot for us because they have fully removed legacy support for automatically being able to format anything that has an iostream `<<` operator. This facility was deprecatd in 8.1 but could be re-enabled with FMT_DEPRECATED_OSTREAM, but even that was removed in 10.0. So this means that we had to write several explicit format handlers for some types for use with format() and print(). Also, they are even more strict with sprintf/printf which don't honor the custom formatters as far as I can tell, so in several cases I also switched those to the std::format/print style. Fixes AcademySoftwareFoundation#3835
fmt 10.0 was recently released, and it breaks a lot for us because they have fully removed legacy support for automatically being able to format anything that has an iostream `<<` operator. This facility was deprecatd in 8.1 but could be re-enabled with FMT_DEPRECATED_OSTREAM, but even that was removed in 10.0. So this means that we had to write several explicit format handlers for some types for use with format() and print(). Also, they are even more strict with sprintf/printf which don't honor the custom formatters as far as I can tell, so in several cases I also switched those to the std::format/print style. Fixes AcademySoftwareFoundation#3835
fmt 10.0 was recently released, and it breaks a lot for us because they have fully removed legacy support for automatically being able to format anything that has an iostream `<<` operator. This facility was deprecatd in 8.1 but could be re-enabled with FMT_DEPRECATED_OSTREAM, but even that was removed in 10.0. So this means that we had to write several explicit format handlers for some types for use with format() and print(). Also, they are even more strict with sprintf/printf which don't honor the custom formatters as far as I can tell, so in several cases I also switched those to the std::format/print style. Fixes AcademySoftwareFoundation#3835
fmt 10.0 was recently released, and it breaks a lot for us because they have fully removed legacy support for automatically being able to format anything that has an iostream `<<` operator. This facility was deprecatd in 8.1 but could be re-enabled with FMT_DEPRECATED_OSTREAM, but even that was removed in 10.0. So this means that we had to write several explicit format handlers for some types for use with format() and print(). Also, they are even more strict with sprintf/printf which don't honor the custom formatters as far as I can tell, so in several cases I also switched those to the std::format/print style. Fixes AcademySoftwareFoundation#3835
fmt 10.0 was recently released, and it breaks a lot for us because they have fully removed legacy support for automatically being able to format anything that has an iostream `<<` operator. This facility was deprecatd in 8.1 but could be re-enabled with FMT_DEPRECATED_OSTREAM, but even that was removed in 10.0. So this means that we had to write several explicit format handlers for some types for use with format() and print(). Also, they are even more strict with sprintf/printf which don't honor the custom formatters as far as I can tell, so in several cases I also switched those to the std::format/print style. Fixes AcademySoftwareFoundation#3835
fmt 10.0 was recently released, and it breaks a lot for us because they have fully removed legacy support for automatically being able to format anything that has an iostream
<<
operator. This facility was deprecatd in 8.1 but could be re-enabled with FMT_DEPRECATED_OSTREAM, but even that was removed in 10.0.So this means that we had to write several explicit format handlers for some types for use with format() and print().
Also, they are even more strict with sprintf/printf which don't honor the custom formatters as far as I can tell, so in several cases I also switched those to the std::format/print style.
Fixes #3835