Use of deprecated C++ API in src
Offen
Dieses Issue hat noch niemand übernommen.
c++
lib / src
- Vorherrschende Sprache
- JavaScript
- Sterne
- 122k
- Forks
- 37.3k
- Ø Merge
- 4 T. 2 Std.
- Gemergte PRs (30 T.)
- 283
Beschreibung
In file included from ../../test/cctest/test_util.cc:1:
In file included from ../../src/debug_utils-inl.h:6:
In file included from ../../src/debug_utils.h:6:
In file included from ../../src/async_wrap.h:27:
In file included from ../../src/base_object.h:29:
In file included from ../../src/memory_tracker.h:5:
In file included from ../../deps/v8/include/v8-profiler.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:950:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/inout_ptr.h:16:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/shared_ptr.h:22:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__fwd/ostream.h:13:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__fwd/string.h:45:41: warning: 'char_traits<unsigned char>' is deprecated: char_traits<T> for T not equ
al to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in a future release, so please migrate off of it. [-Wdeprecated-declarations]
45 | template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
| ^
../../src/util.h:506:15: note: in instantiation of default argument for 'basic_string<unsigned char>' required here
506 | inline std::basic_string<T> ToString() const { return {out(), length()}; }
| ^~~~~~~~~~~~~~~
../../test/cctest/test_util.cc:229:37: note: in instantiation of template class 'node::MaybeStackBuffer<unsigned char>' requested here
229 | MaybeStackBuffer<unsigned char> buf(100);
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__fwd/string.h:24:8: note: 'char_traits<unsigned char>' has been explicitly marked deprecated here
24 | struct _LIBCPP_DEPRECATED_(
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:555:53: note: expanded from macro '_LIBCPP_DEPRECATED_'
555 | # define _LIBCPP_DEPRECATED_(m) __attribute__((__deprecated__(m)))
| ^
In file included from ../../test/cctest/test_util.cc:1:
In file included from ../../src/debug_utils-inl.h:6:
In file included from ../../src/debug_utils.h:6:
In file included from ../../src/async_wrap.h:27:
In file included from ../../src/base_object.h:29:
In file included from ../../src/memory_tracker.h:5:
In file included from ../../deps/v8/include/v8-profiler.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/unordered_set:1846:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/functional:601:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:363:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:197:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:28:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:654:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:221:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__fwd/string_view.h:22:41: warning: 'char_traits<unsigned char>' is deprecated: char_traits<T> for T no
t equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in a future release, so please migrate off of it. [-Wdeprecated-declarations]
22 | template <class _CharT, class _Traits = char_traits<_CharT> >
| ^
../../src/util.h:507:15: note: in instantiation of default argument for 'basic_string_view<unsigned char>' required here
507 | inline std::basic_string_view<T> ToStringView() const {
| ^~~~~~~~~~~~~~~~~~~~
../../test/cctest/test_util.cc:229:37: note: in instantiation of template class 'node::MaybeStackBuffer<unsigned char>' requested here
229 | MaybeStackBuffer<unsigned char> buf(100);
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__fwd/string.h:24:8: note: 'char_traits<unsigned char>' has been explicitly marked deprecated here
24 | struct _LIBCPP_DEPRECATED_(
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:555:53: note: expanded from macro '_LIBCPP_DEPRECATED_'
555 | # define _LIBCPP_DEPRECATED_(m) __attribute__((__deprecated__(m)))
|
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit src/util.h ungefähr bei den Zeilen 506–507 und test/cctest/test_util.cc ungefähr bei Zeile 229 und reproduziere die Warnung auf der gemeldeten macOS-Toolchain. Verfolge die Instanziierung von MaybeStackBuffer und ermittle den unterstützten C++ API-Pfad; als erledigt gilt die Aufgabe, wenn der betroffene Test-Build diese Deprecation-Warnungen nicht mehr ausgibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp
- Bereich
- backend
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 58/100