nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
108.11k stars 29.86k forks source link

cares deprecation warnings #52464

Open targos opened 7 months ago

targos commented 7 months ago
``` [3957/4158] CXX obj/src/libnode.cares_wrap.o ../../src/cares_wrap.cc:217:16: warning: 'ares_parse_a_reply' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations] status = ares_parse_a_reply(buf, ^ ../../deps/cares/include/ares.h:771:14: note: 'ares_parse_a_reply' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_a_reply( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ ../../src/cares_wrap.cc:224:16: warning: 'ares_parse_aaaa_reply' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations] status = ares_parse_aaaa_reply(buf, ^ ../../deps/cares/include/ares.h:775:14: note: 'ares_parse_aaaa_reply' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_aaaa_reply( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ ../../src/cares_wrap.cc:231:16: warning: 'ares_parse_ns_reply' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations] status = ares_parse_ns_reply(buf, len, &host); ^ ../../deps/cares/include/ares.h:786:14: note: 'ares_parse_ns_reply' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_ns_reply( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ ../../src/cares_wrap.cc:234:16: warning: 'ares_parse_ptr_reply' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations] status = ares_parse_ptr_reply(buf, len, nullptr, 0, AF_INET, &host); ^ ../../deps/cares/include/ares.h:782:14: note: 'ares_parse_ptr_reply' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_ptr_reply( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ ../../src/cares_wrap.cc:293:16: warning: 'ares_parse_mx_reply' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations] int status = ares_parse_mx_reply(buf, len, &mx_start); ^ ../../deps/cares/include/ares.h:792:14: note: 'ares_parse_mx_reply' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_mx_reply( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ ../../src/cares_wrap.cc:328:16: warning: 'ares_parse_caa_reply' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations] int status = ares_parse_caa_reply(buf, len, &caa_start); ^ ../../deps/cares/include/ares.h:779:14: note: 'ares_parse_caa_reply' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_caa_reply( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ ../../src/cares_wrap.cc:365:16: warning: 'ares_parse_txt_reply_ext' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations] int status = ares_parse_txt_reply_ext(buf, len, &txt_out); ^ ../../deps/cares/include/ares.h:798:14: note: 'ares_parse_txt_reply_ext' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_txt_reply_ext( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ ../../src/cares_wrap.cc:428:16: warning: 'ares_parse_srv_reply' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations] int status = ares_parse_srv_reply(buf, len, &srv_start); ^ ../../deps/cares/include/ares.h:789:14: note: 'ares_parse_srv_reply' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_srv_reply( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ ../../src/cares_wrap.cc:470:16: warning: 'ares_parse_naptr_reply' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations] int status = ares_parse_naptr_reply(buf, len, &naptr_start); ^ ../../deps/cares/include/ares.h:801:14: note: 'ares_parse_naptr_reply' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_naptr_reply( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ ../../src/cares_wrap.cc:801:3: warning: 'ares_get_servers_ports' is deprecated: Use ares_get_servers_ports_csv instead [-Wdeprecated-declarations] ares_get_servers_ports(channel_, &servers); ^ ../../deps/cares/include/ares.h:859:3: note: 'ares_get_servers_ports' has been explicitly marked deprecated here CARES_DEPRECATED_FOR(ares_get_servers_ports_csv) int ares_get_servers_ports( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ ../../src/cares_wrap.cc:1321:16: warning: 'ares_parse_soa_reply' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations] int status = ares_parse_soa_reply(buf, len, &soa_out); ^ ../../deps/cares/include/ares.h:804:14: note: 'ares_parse_soa_reply' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_soa_reply( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ ../../src/cares_wrap.cc:1658:11: warning: 'ares_get_servers_ports' is deprecated: Use ares_get_servers_ports_csv instead [-Wdeprecated-declarations] int r = ares_get_servers_ports(channel->cares_channel(), &servers); ^ ../../deps/cares/include/ares.h:859:3: note: 'ares_get_servers_ports' has been explicitly marked deprecated here CARES_DEPRECATED_FOR(ares_get_servers_ports_csv) int ares_get_servers_ports( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ ../../src/cares_wrap.cc:1703:14: warning: 'ares_set_servers' is deprecated: Use ares_set_servers_csv instead [-Wdeprecated-declarations] int rv = ares_set_servers(channel->cares_channel(), nullptr); ^ ../../deps/cares/include/ares.h:841:14: note: 'ares_set_servers' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_set_servers_csv) int ares_set_servers( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ ../../src/cares_wrap.cc:1758:11: warning: 'ares_set_servers_ports' is deprecated: Use ares_set_servers_ports_csv instead [-Wdeprecated-declarations] err = ares_set_servers_ports(channel->cares_channel(), servers.data()); ^ ../../deps/cares/include/ares.h:845:3: note: 'ares_set_servers_ports' has been explicitly marked deprecated here CARES_DEPRECATED_FOR(ares_set_servers_ports_csv) int ares_set_servers_ports( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ In file included from ../../src/cares_wrap.cc:22: ../../src/cares_wrap.h:251:5: warning: 'ares_query' is deprecated: Use ares_query_dnsrec instead [-Wdeprecated-declarations] ares_query( ^ ../../src/cares_wrap.cc:832:9: note: in instantiation of member function 'node::cares_wrap::QueryWrap::AresQuery' requested here wrap->AresQuery(name, ns_c_in, ns_t_any); ^ ../../deps/cares/include/ares.h:549:14: note: 'ares_query' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_query_dnsrec) void ares_query( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ In file included from ../../src/cares_wrap.cc:22: ../../src/cares_wrap.h:251:5: warning: 'ares_query' is deprecated: Use ares_query_dnsrec instead [-Wdeprecated-declarations] ares_query( ^ ../../src/cares_wrap.cc:837:9: note: in instantiation of member function 'node::cares_wrap::QueryWrap::AresQuery' requested here wrap->AresQuery(name, ns_c_in, ns_t_a); ^ ../../deps/cares/include/ares.h:549:14: note: 'ares_query' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_query_dnsrec) void ares_query( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ In file included from ../../src/cares_wrap.cc:22: ../../src/cares_wrap.h:251:5: warning: 'ares_query' is deprecated: Use ares_query_dnsrec instead [-Wdeprecated-declarations] ares_query( ^ ../../src/cares_wrap.cc:842:9: note: in instantiation of member function 'node::cares_wrap::QueryWrap::AresQuery' requested here wrap->AresQuery(name, ns_c_in, ns_t_aaaa); ^ ../../deps/cares/include/ares.h:549:14: note: 'ares_query' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_query_dnsrec) void ares_query( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ In file included from ../../src/cares_wrap.cc:22: ../../src/cares_wrap.h:251:5: warning: 'ares_query' is deprecated: Use ares_query_dnsrec instead [-Wdeprecated-declarations] ares_query( ^ ../../src/cares_wrap.cc:847:9: note: in instantiation of member function 'node::cares_wrap::QueryWrap::AresQuery' requested here wrap->AresQuery(name, ns_c_in, T_CAA); ^ ../../deps/cares/include/ares.h:549:14: note: 'ares_query' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_query_dnsrec) void ares_query( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ In file included from ../../src/cares_wrap.cc:22: ../../src/cares_wrap.h:251:5: warning: 'ares_query' is deprecated: Use ares_query_dnsrec instead [-Wdeprecated-declarations] ares_query( ^ ../../src/cares_wrap.cc:852:9: note: in instantiation of member function 'node::cares_wrap::QueryWrap::AresQuery' requested here wrap->AresQuery(name, ns_c_in, ns_t_cname); ^ ../../deps/cares/include/ares.h:549:14: note: 'ares_query' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_query_dnsrec) void ares_query( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ In file included from ../../src/cares_wrap.cc:22: ../../src/cares_wrap.h:251:5: warning: 'ares_query' is deprecated: Use ares_query_dnsrec instead [-Wdeprecated-declarations] ares_query( ^ ../../src/cares_wrap.cc:857:9: note: in instantiation of member function 'node::cares_wrap::QueryWrap::AresQuery' requested here wrap->AresQuery(name, ns_c_in, ns_t_mx); ^ ../../deps/cares/include/ares.h:549:14: note: 'ares_query' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_query_dnsrec) void ares_query( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ In file included from ../../src/cares_wrap.cc:22: ../../src/cares_wrap.h:251:5: warning: 'ares_query' is deprecated: Use ares_query_dnsrec instead [-Wdeprecated-declarations] ares_query( ^ ../../src/cares_wrap.cc:862:9: note: in instantiation of member function 'node::cares_wrap::QueryWrap::AresQuery' requested here wrap->AresQuery(name, ns_c_in, ns_t_ns); ^ ../../deps/cares/include/ares.h:549:14: note: 'ares_query' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_query_dnsrec) void ares_query( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ In file included from ../../src/cares_wrap.cc:22: ../../src/cares_wrap.h:251:5: warning: 'ares_query' is deprecated: Use ares_query_dnsrec instead [-Wdeprecated-declarations] ares_query( ^ ../../src/cares_wrap.cc:867:9: note: in instantiation of member function 'node::cares_wrap::QueryWrap::AresQuery' requested here wrap->AresQuery(name, ns_c_in, ns_t_txt); ^ ../../deps/cares/include/ares.h:549:14: note: 'ares_query' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_query_dnsrec) void ares_query( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ In file included from ../../src/cares_wrap.cc:22: ../../src/cares_wrap.h:251:5: warning: 'ares_query' is deprecated: Use ares_query_dnsrec instead [-Wdeprecated-declarations] ares_query( ^ ../../src/cares_wrap.cc:872:9: note: in instantiation of member function 'node::cares_wrap::QueryWrap::AresQuery' requested here wrap->AresQuery(name, ns_c_in, ns_t_srv); ^ ../../deps/cares/include/ares.h:549:14: note: 'ares_query' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_query_dnsrec) void ares_query( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ In file included from ../../src/cares_wrap.cc:22: ../../src/cares_wrap.h:251:5: warning: 'ares_query' is deprecated: Use ares_query_dnsrec instead [-Wdeprecated-declarations] ares_query( ^ ../../src/cares_wrap.cc:877:9: note: in instantiation of member function 'node::cares_wrap::QueryWrap::AresQuery' requested here wrap->AresQuery(name, ns_c_in, ns_t_ptr); ^ ../../deps/cares/include/ares.h:549:14: note: 'ares_query' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_query_dnsrec) void ares_query( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ In file included from ../../src/cares_wrap.cc:22: ../../src/cares_wrap.h:251:5: warning: 'ares_query' is deprecated: Use ares_query_dnsrec instead [-Wdeprecated-declarations] ares_query( ^ ../../src/cares_wrap.cc:882:9: note: in instantiation of member function 'node::cares_wrap::QueryWrap::AresQuery' requested here wrap->AresQuery(name, ns_c_in, ns_t_naptr); ^ ../../deps/cares/include/ares.h:549:14: note: 'ares_query' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_query_dnsrec) void ares_query( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ In file included from ../../src/cares_wrap.cc:22: ../../src/cares_wrap.h:251:5: warning: 'ares_query' is deprecated: Use ares_query_dnsrec instead [-Wdeprecated-declarations] ares_query( ^ ../../src/cares_wrap.cc:887:9: note: in instantiation of member function 'node::cares_wrap::QueryWrap::AresQuery' requested here wrap->AresQuery(name, ns_c_in, ns_t_soa); ^ ../../deps/cares/include/ares.h:549:14: note: 'ares_query' has been explicitly marked deprecated here CARES_EXTERN CARES_DEPRECATED_FOR(ares_query_dnsrec) void ares_query( ^ ../../deps/cares/include/ares.h:145:22: note: expanded from macro 'CARES_DEPRECATED_FOR' __attribute__((deprecated("Use " #f " instead"))) ^ 26 warnings generated. ```
richardlau commented 7 months ago

For some background, these started in https://github.com/nodejs/node/pull/52285 and were noted there -- they were failing the build but were changed from errors to warnings https://github.com/nodejs/node/blob/ee4fa77624f17c1958dac47fddbe7d9513b9dee8/deps/cares/cares.gyp#L156-L161

RedYetiDev commented 4 months ago

For reference, It appears C-ares has merged all of the different parsers into a universal ares_dns_record_t structure. The documentation for this is https://c-ares.org/docs/ares_dns_record.html.