Skip to content
This repository was archived by the owner on May 16, 2023. It is now read-only.

Commit 1bc09f8

Browse files
vitautfacebook-github-bot
authored andcommitted
Make uses of {fmt} compatible with platorm010
Summary: {fmt} requires a format string to be either known at compile time or wrapped in `fmt::runtime` on platform010. Fix this, enable compile-time checks and remove unnecessary string allocations. Fixes: ``` 1 ti/crypto_ssl/cert_renewal/CryptosslConfigUtil.cpp:60:22: error: call to consteval function 'fmt::basic_format_string<char, const std::basic_string<char> &, std::basic_string<char> &>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 ti/crypto_ssl/cert_renewal/CryptosslConfigUtil.cpp:49:31: error: call to consteval function 'fmt::basic_format_string<char, const std::basic_string<char> &, const std::basic_string<char> &>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 ti/crypto_ssl/cert_renewal/CryptosslConfigUtil.cpp:48:32: error: call to consteval function 'fmt::basic_format_string<char, const std::basic_string<char> &, const std::basic_string<char> &>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 ti/crypto_ssl/cert_renewal/CryptosslConfigUtil.cpp:38:28: error: call to consteval function 'fmt::basic_format_string<char, const std::basic_string<char> &>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/preprocessor/DashVideoSubstreamProcessor.cpp:550:19: error: call to consteval function 'fmt::basic_format_string<char, fmt::detail::named_arg<char, std::basic_string<char>>, fmt::detail::named_arg<char, std::basic_string<char>>, fmt::detail::named_arg<char, std::basic_string<char>>>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/preprocessor/DashVideoSubstreamProcessor.cpp:383:7: error: call to consteval function 'fmt::basic_format_string<char, fmt::detail::named_arg<char, std::basic_string<char>>, fmt::detail::named_arg<char, std::basic_string<char>>, fmt::detail::named_arg<char, std::basic_string<char>>>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/preprocessor/DashVideoSubstreamProcessor.cpp:183:7: error: call to consteval function 'fmt::basic_format_string<char, fmt::detail::named_arg<char, std::basic_string<char>>, fmt::detail::named_arg<char, std::basic_string<char>>, fmt::detail::named_arg<char, std::basic_string<char>>>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/live_streaming/fb_live_server/media/processing/EncodingProcessFactory.cpp:201:9: error: call to consteval function 'fmt::basic_format_string<char, const std::basic_string<char> &>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/live_streaming/fb_live_server/media/MpdGenerator.cpp:383:7: error: call to consteval function 'fmt::basic_format_string<char, char const (&)[7]>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/live_streaming/fb_live_server/app/subscribers/LiveDashManager.cpp:1336:22: error: call to consteval function 'fmt::basic_format_string<char, const std::basic_string<char> &>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/encode_service/worker/test/ResourceTrackerTest.cpp:1594:41: error: call to consteval function 'fmt::basic_format_string<char, int>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/encode_service/worker/test/ResourceTrackerTest.cpp:1592:38: error: call to consteval function 'fmt::basic_format_string<char, int>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/encode_service/worker/test/ResourceTrackerTest.cpp:1589:41: error: call to consteval function 'fmt::basic_format_string<char, int>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/encode_service/worker/test/ResourceTrackerTest.cpp:1587:38: error: call to consteval function 'fmt::basic_format_string<char, int>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/encode_service/worker/test/ResourceTrackerTest.cpp:1571:21: error: call to consteval function 'fmt::basic_format_string<char, int>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/encode_service/worker/test/ResourceTrackerTest.cpp:1569:21: error: call to consteval function 'fmt::basic_format_string<char, int>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/encode_service/dispatcher/worker_pool/test/WorkerPoolTest.cpp:245:13: error: call to consteval function 'fmt::basic_format_string<char, std::basic_string<char>>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/encode_service/dispatcher/queue/QueuePriThrottleControllers.cpp:149:13: error: call to consteval function 'fmt::basic_format_string<char, const std::basic_string<char> &, const std::basic_string<char>>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/encode_service/dispatcher/queue/QueuePriThrottleControllers.cpp:112:13: error: call to consteval function 'fmt::basic_format_string<char, const std::basic_string<char> &, const std::basic_string<char>>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/encode_service/client/test/ClientTest.cpp:664:11: error: call to consteval function 'fmt::basic_format_string<char, char const (&)[18], const std::basic_string<char> &, const std::basic_string<char> &, char const (&)[5]>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/encode_service/client/test/ClientTest.cpp:630:11: error: call to consteval function 'fmt::basic_format_string<char, char const (&)[18], const std::basic_string<char> &, const std::basic_string<char> &, char const (&)[5]>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/encode_service/client/test/ClientTest.cpp:596:11: error: call to consteval function 'fmt::basic_format_string<char, char const (&)[18], const std::basic_string<char> &, const std::basic_string<char> &, char const (&)[5]>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/encode_service/client/test/ClientTest.cpp:567:11: error: call to consteval function 'fmt::basic_format_string<char, char const (&)[18], const std::basic_string<char> &, const std::basic_string<char> &, char const (&)[7]>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/encode_service/client/test/ClientTest.cpp:506:11: error: call to consteval function 'fmt::basic_format_string<char, char const (&)[18], const std::basic_string<char> &, const std::basic_string<char> &, char const (&)[4]>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/encode_service/client/test/ClientTest.cpp:479:11: error: call to consteval function 'fmt::basic_format_string<char, char const (&)[18], const std::basic_string<char> &, char const (&)[8], char const (&)[4]>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/encode_service/client/test/ClientTest.cpp:462:11: error: call to consteval function 'fmt::basic_format_string<char, char const (&)[18], const std::basic_string<char> &, const std::basic_string<char> &, char const (&)[4]>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/dash_oil/test/DashMultiLaneOilSegmentsByteReaderTest.cpp:910:32: error: call to consteval function 'fmt::basic_format_string<char, int, const std::basic_string<char> &>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 sve/dash_oil/test/DashMultiLaneOilSegmentsByteReaderTest.cpp:909:32: error: call to consteval function 'fmt::basic_format_string<char, int, const std::basic_string<char> &>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 smart/video_infra_cms/ingest/IngestServiceHandler.cpp:246:44: error: call to consteval function 'fmt::basic_format_string<char>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 smart/luna/adaptive_sampling_service/Types.h:108:33: error: call to consteval function 'fmt::basic_format_string<char>::basic_format_string<std::basic_string_view<char>, 0>' is not a constant expression 1 pubcontent/suggestions/aggregator/common/logger/NebulaSessionDataManager.cpp:162:22: error: call to consteval function 'fmt::basic_format_string<char, std::basic_string<char> &, std::basic_string<char> &>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 monitoring/events/event_store/decoration/event_operation_consumer/event_operation_consumer.cpp:116:19: error: call to consteval function 'fmt::basic_format_string<char, long &>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 maps/renderer/mapbox/MapboxManager.cpp:46:19: error: call to consteval function 'fmt::basic_format_string<char, int, int, int &>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 insights/cocoon/queryplanner/queryoptimizer/test/QueryOptimizerTest.cpp:1692:21: error: call to consteval function 'fmt::basic_format_string<char, long &>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 insights/cocoon/queryplanner/queryoptimizer/test/QueryOptimizerTest.cpp:1664:21: error: call to consteval function 'fmt::basic_format_string<char, long &>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 frl/codec_avatar/hmc/get_hmc_fbpkg_diffs.cpp:385:35: error: call to consteval function 'fmt::basic_format_string<char, long &, long &>::basic_format_string<char [790], 0>' is not a constant expression 1 folly/experimental/AutoTimer.h:101:37: error: call to consteval function 'fmt::basic_format_string<char, unsigned long &, unsigned long &, unsigned long &>::basic_format_string<char [34], 0>' is not a constant expression 1 dyno/cpp/server/KernelMonitor.cpp:967:32: error: call to consteval function 'fmt::basic_format_string<char, const std::basic_string<char> &>::basic_format_string<const char *, 0>' is not a constant expression 1 dyno/cpp/server/KernelMonitor.cpp:964:21: error: call to consteval function 'fmt::basic_format_string<char, const std::basic_string<char> &>::basic_format_string<const char *, 0>' is not a constant expression 1 delos_entity/tools/thrift_plugin/annotations/codegen.cpp:73:7: error: call to consteval function 'fmt::basic_format_string<char, fmt::detail::named_arg<char, std::basic_string<char>>, fmt::detail::named_arg<char, std::basic_string<char>>, fmt::detail::named_arg<char, const char *>, fmt::detail::named_arg<char, std::basic_string<char>>>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 delos_entity/tools/thrift_plugin/annotations/codegen.cpp:114:7: error: call to consteval function 'fmt::basic_format_string<char, fmt::detail::named_arg<char, char [10]>, fmt::detail::named_arg<char, std::basic_string<char>>, fmt::detail::named_arg<char, std::basic_string<char>>, fmt::detail::named_arg<char, std::basic_string<char>>, fmt::detail::named_arg<char, std::basic_string<char>>>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 delos_entity/tools/thrift_plugin/annotations/codegen.cpp:103:9: error: call to consteval function 'fmt::basic_format_string<char, fmt::detail::named_arg<char, std::basic_string<char>>, fmt::detail::named_arg<char, std::basic_string<char>>>::basic_format_string<const char *, 0>' is not a constant expression 1 dba/go/lib/jobmanager/shim/ShimUtils.cpp:208:7: error: call to consteval function 'fmt::basic_format_string<char, const std::basic_string<char> &, int, long, std::basic_string<char> &>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 calibra/services/gateway_webhook/tests/NoviGatewayWebhookTestFixtureBase.cpp:32:7: error: call to consteval function 'fmt::basic_format_string<char, fmt::detail::named_arg<char, std::basic_string<char>>, fmt::detail::named_arg<char, std::basic_string<char>>>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 buck-out/v2/gen/fbcode/d839c731f5505c62/videoinfra/tps/__request_context__/headers/videoinfra/tps/common/TpsRequestContext.h:34:52: error: call to consteval function 'fmt::basic_format_string<char, const std::basic_string<char> &>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 buck-out/v2/gen/fbcode/d839c731f5505c62/videoinfra/tps/__request_context__/headers/videoinfra/tps/common/TpsRequestContext.h:34:52: error: call to consteval function 'fmt::basic_format_string<char, const std::basic_string<char> &, const std::basic_string<char> &, const std::basic_string<char> &, const std::basic_string<char> &>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 bistro/fry/logprocess/RowConsumers.cpp:69:9: error: call to consteval function 'fmt::basic_format_string<char, fmt::detail::named_arg<char, std::basic_string<char>>>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 bistro/facebook/bistro/nodes/ShardManagerShardsByPropertyFetcher.cpp:53:27: error: call to consteval function 'fmt::basic_format_string<char, fmt::detail::named_arg<char, std::basic_string<char>>, fmt::detail::named_arg<char, std::basic_string<char>>, fmt::detail::named_arg<char, std::basic_string<char>>, fmt::detail::named_arg<char, std::basic_string<char>>>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression 1 bistro/bistro/nodes/AddTimeFetcher.h:175:24: error: call to consteval function 'fmt::basic_format_string<char, fmt::detail::named_arg<char, std::basic_string<char>>, fmt::detail::named_arg<char, std::basic_string<char>>>::basic_format_string<std::basic_string<char>, 0>' is not a constant expression ``` Reviewed By: Orvid Differential Revision: D36288637 fbshipit-source-id: 2d318e3018b84429383ce63bb495dd8ffd8335a3
1 parent 7dba229 commit 1bc09f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bistro/nodes/AddTimeFetcher.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class AddTimeFetcher : public NodeFetcher {
172172
for (const auto& parent : my_level_and_parents.second) {
173173
for (const auto& tags_and_enabled : time_to_tags_and_enabled) {
174174
all_nodes->add(
175-
fmt::format(format_str,
175+
fmt::format(fmt::runtime(format_str),
176176
fmt::arg("parent", parent->name()),
177177
fmt::arg("time", folly::to<string>(tags_and_enabled.first))),
178178
my_level_and_parents.first,

0 commit comments

Comments
 (0)