chore: upgrade kotatsu, adopt renamed codec entries and KOTATSU_ANNOTATE - #590
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe pull request migrates JSON and TOML operations to Kotatsu string-based codec APIs, replaces ChangesKotatsu migration and formatting
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/server/state/config.h`:
- Around line 44-112: Update all stale defaulted<T> member accesses to use
native direct field access instead of .value. In src/server/state/config.h lines
44-112, adjust ProjectConfig and TrackerConfig accesses in production code and
tests; in src/feature/feature.h lines 89-128 and 233-258, adjust
CodeCompletionOptions, HoverOptions, and InlayHintsOptions accesses. Replace
both reads and writes while preserving existing fallback and configuration
behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: fe717f8f-e1ca-4677-a62d-34ecbb758a9c
📒 Files selected for processing (33)
.clang-formatbenchmarks/scan_benchmark.cppcmake/package.cmakesrc/command/command.cppsrc/driver/inspect.ccsrc/feature/feature.hsrc/semantic/resolver.cppsrc/server/compiler/compiler.cppsrc/server/compiler/indexer.cppsrc/server/protocol/serialize.hsrc/server/service/feature_router.cppsrc/server/service/format.cppsrc/server/state/config.cppsrc/server/state/config.hsrc/server/state/session_store.cppsrc/server/state/workspace.cppsrc/server/transport/agentic.hsrc/server/transport/lsp_client.cppsrc/server/transport/master_server.cppsrc/server/worker/stateful_worker.cppsrc/server/worker/worker_pool.cppsrc/support/cache_store.cppsrc/support/glob_pattern.cppsrc/syntax/annotation.cppsrc/syntax/dependency_graph.cpptests/unit/command/command_tests.cpptests/unit/server/compile_graph_integration_tests.cpptests/unit/server/compiler_tests.cpptests/unit/server/config_tests.cpptests/unit/server/module_worker_tests.cpptests/unit/server/pch_worker_tests.cpptests/unit/server/stateful_worker_tests.cpptests/unit/support/markup_tests.cpp
What changed
Bumps the kotatsu pin from
c516e3a(#181) to340a32a(#196) and migrates every call site to the new API surface:json::to_json→json::to_string,json::from_json/json::parse→json::from_string,toml::parse<T>(text)→toml::from_string<T>(text),toml::from_toml<Config>(text, out)→toml::from_string<Config>(text, out).bincode::to_bytes/from_bytesare unchanged. No flatbuffers migration — clice has nocodec::fbscall sites; the codec just stays enabled.kota::meta::defaulted<T>/annotation<T, attrs::skip>wrappers were removed upstream, soConfig/ProjectConfig/TrackerConfig/ConfigRule, the three feature options structs, and the cache-metadata struct inworkspace.cppnow use theKOTATSU_ANNOTATE(defaulted = true, ...)/KOTATSU_ANNOTATE(skip = true)macro. The macro expands to the sameannotation<T, spec<Tag>>wrapper, so field access (.value, aggregate inheritance) and decode semantics are unchanged.description = "..."attribute (validated against actual usage; options that are declared but not consumed yet are marked "not yet implemented"). The internal cache struct keepsdefaultedonly.StatementMacros: KOTATSU_ANNOTATE(keeps<T> field;on its own line) andBreakAdjacentStringLiterals: true(stacks long description literals). The latter reflows adjacent string literals in ~10 test files — content-identical, formatting only.Tests
All four suites locally on Debug: unit 1167/1167 (7 skipped), integration 340 passed / 2 skipped, smoke 3/3, snap 395 passed / 68 skipped. Unit suite re-run after the final doc-string fixes.