src: migrate deprecated c-ares APIs to modern replacements#62724
src: migrate deprecated c-ares APIs to modern replacements#62724omghante wants to merge 1 commit intonodejs:mainfrom
Conversation
|
Review requested:
|
d0750bf to
140cde3
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #62724 +/- ##
==========================================
- Coverage 91.55% 89.70% -1.86%
==========================================
Files 355 706 +351
Lines 149381 218270 +68889
Branches 23364 41777 +18413
==========================================
+ Hits 136765 195790 +59025
- Misses 12354 14415 +2061
- Partials 262 8065 +7803
🚀 New features to boost your workflow:
|
140cde3 to
abc640a
Compare
|
CI is very red |
abc640a to
fedc05d
Compare
|
Thanks @mcollina! Fixed, all workflows are finally back to green! Feel free to take a look whenever you have a chance. |
a93485a to
e5e76a2
Compare
|
@mcollina I've reworked the approach now just suppressing the warnings with compiler pragmas instead of migrating APIs. Test file is fully untouched, all fe80:: cases preserved. Full API migration will be a follow-up PR. |
Suppress deprecation warnings for legacy c-ares APIs (ares_parse_*_reply, ares_get_servers_ports, ares_set_servers_ports) using compiler pragmas for Clang, GCC, and MSVC. A full migration to the modern replacement APIs (ares_dns_parse, ares_get_servers_csv, ares_set_servers_csv) is left as follow-up work. Fixes: nodejs#52464 Signed-off-by: om-ghante <mr.omghante1@gmail.com>
e5e76a2 to
8014a4d
Compare
|
@thisalihassan Great catches, all valid. I've force-pushed a new approach just pragma-based warning suppression (13 lines, 1 file). No API migration, so the IPv6 link-local and CNAME-TTL clamping issues are gone. Signed-off-by added. Full migration can be a separate PR. |
This PR resolves the deprecation warnings in src/cares_wrap.cc by using compiler pragmas to suppress the
-Wdeprecated-declarationswarnings across Clang, GCC, and MSVC.As discussed with reviewers, a full migration to the modern replacement APIs (
ares_dns_parse,ares_get_servers_csv,ares_set_servers_csv) will be tackled in a separate follow-up PR to avoid regressions with CNAME-TTL clamping and unscoped IPv6 link-local addresses.Fixes: #52464