Рефакторинг: удаление nlohmann::json из проекта#91
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: netkeep80#90
- Удалён third_party/nlohmann/json.hpp (~25k строк, ~930 КБ) - pjson_serializer.h: замена nlohmann::detail::to_chars на std::to_chars (C++17) с добавлением ".0" для целых double (100.0 → "100.0") - pjson.h: удалены вспомогательные методы _to_nlohmann() и _from_nlohmann(); прямая сериализация to_string()/from_string() уже реализована (F6) - Тесты: все ссылки на nlohmann заменены на pjson::from_string/to_string; round-trip верификация — нормализация через pjson вместо nlohmann::dump() - readme.md: обновлены упоминания nlohmann, добавлены pjson_serializer.h, pjson_interning.h, pjson_node_pool.h в таблицу файлов проекта - Все 245 тестов проходят Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This reverts commit 52fc168.
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
🤖 AI Work Session Started Starting automated work session at 2026-02-28T16:56:30.477Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback. |
🔄 Auto-restart triggeredReason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. Will continue until PR becomes mergeable. |
- pjson_serializer.h: исправить выравнивание переменных (char buf[64], std::to_chars_result res, std::size_t len) в соответствии с .clang-format (AlignConsecutiveDeclarations требует точное выравнивание по clang-format) - pam_core.h: добавить #include <typeinfo> для поддержки typeid(T).name() на MSVC (без этого заголовка MSVC выдаёт C2027: use of undefined type 'type_info') Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🔄 Auto-restart-until-mergeable Log (iteration 1)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
Исправляет
Fixes #90 (пункт 2: удаление nlohmann::json)
Что сделано
1. Удалён
third_party/nlohmann/json.hpp(~930 КБ, ~25 500 строк)Единственная внешняя зависимость проекта полностью удалена. Проект теперь не имеет внешних зависимостей по JSON.
2. Замена
nlohmann::detail::to_charsвpjson_serializer.hФорматирование
doubleпереведено с алгоритма Grisu2 из nlohmann на стандартныйstd::to_chars(C++17). Добавлена логика гарантированного суффикса.0для целых значений (100.0 → "100.0"), что совпадает с ожидаемым поведением тестов.3. Удалены
_to_nlohmann()и_from_nlohmann()изpjson.hВспомогательные методы для конвертации
pjson ↔ nlohmann::jsonбольше не нужны: прямая сериализацияto_string()/from_string()реализована (F6, задача #84).4. Рефакторинг тестовых файлов
test_pjson_serial.cpppjson::from_string+to_stringвместоnlohmann::json::parse+dump()test_pjson_large.cpptest.jsonчерез прямой парсер F6, верификация без nlohmanntest_pjson_opt.cppnlohmann::json::dump()test_pjson_bench.cpp5. Обновлён
readme.mdУбраны ссылки на nlohmann как зависимость/аналог, добавлены файлы
pjson_serializer.h,pjson_interning.h,pjson_node_pool.hв таблицу проекта.Результат тестирования
Все 245 тестов проходят локально (
ctest, Ubuntu, GCC, C++17 Release).🤖 Generated with Claude Code