Re: [PATCH] ci: do not die on deprecated-declarations warning
From: Junio C Hamano <hidden>
Date: 2023-01-14 16:55:10
Jeff King [off-list ref] writes:
quoted
+# Libraries deprecate symbols while retaining them for a long time to +# keep software working with both older and newer versions of them. +# Getting warnings does help the developers' awareness, but we cannot +# afford to update too aggressively. E.g. CURLOPT_REDIR_PROTOCOLS_STR +# is only available in 7.85.0 that deprecates CURLOPT_REDIR_PROTOCOLS +# but we cannot rewrite the uses of the latter with the former until +# 7.85.0, which was released in August 2022, becomes ubiquitous. +DEVELOPER_CFLAGS += -Wno-error=deprecated-declarationsThat's a pretty broad hammer. And I think it may stomp on the hack to rely on deprecated() in the UNUSED macro.
True.
As Ramsay suggested, we could probably use CURL_DISABLE_DEPRECATION to limit this just to the problematic case. An even more focused option is to use curl's helper here:
One possible downside of the use of CURL_DISABLE_DEPRECATION is that we may still want to see deprecation warning to learn about upcoming change. We just do not want the -Werror to make us die when it happens. But anyway, let's use CURL_DISABLE_DEPRECATION first to see how it goes. Thanks.