-
Notifications
You must be signed in to change notification settings - Fork 60
feature: scan deps when server starts #320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughBuild configuration changes add Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
cmake/package.cmake (1)
133-141: cpptrace C++20 modules explicitly disabled via cache optionSetting
CPPTRACE_DISABLE_CXX_20_MODULEStoONbeforeFetchContent_MakeAvailable(cpptrace)is a sensible way to avoid cpptrace’s C++20 module support interfering with your own build/module/dependency‑scanning setup. It should be a no‑op on older cpptrace versions, but verify that v1.0.4 understands this cache option so you’re not relying on undefined behavior; if it does, you might also want to give the cache entry a short description instead of an empty string for easier configuration inspection.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
CMakeLists.txt(1 hunks)cmake/package.cmake(2 hunks)tests/unit/Compiler/CompilerTests.cpp(2 hunks)xmake.lua(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: build (windows-2025, RelWithDebInfo, clang, clang++)
- GitHub Check: build (ubuntu-24.04, Debug, clang-20, clang++-20)
- GitHub Check: build (macos-15, Debug, clang, clang++)
- GitHub Check: build (macos-15, releasedbg)
- GitHub Check: build (windows-2025, releasedbg)
- GitHub Check: build (ubuntu-24.04, releasedbg)
- GitHub Check: build (macos-15, debug)
- GitHub Check: build (ubuntu-24.04, debug)
🔇 Additional comments (4)
CMakeLists.txt (1)
6-6: Explicitly disabling CMake C++ module scanning looks reasonableSetting
CMAKE_CXX_SCAN_FOR_MODULEStoOFFbefore creating targets is consistent with relying on Clang’s dependency scanning instead of CMake’s built‑in module scanning; it will apply globally to all subsequent C++ targets, which seems to match the direction of this PR.xmake.lua (1)
65-83: Debug LLVM link set now includesclangDependencyScanningAdding
clangDependencyScanningto the debug‑onlylinksfor thellvmpackage keeps xmake’s configuration aligned with the CMakellvm-libswiring and is appropriate for enabling dependency scanning in debug builds. Just make sure all prebuilt LLVM bundles used byclice-llvmactually ship this library on every supported platform/mode, or debug builds will fail at link time.cmake/package.cmake (1)
19-36: llvm-libs debug config correctly wiresclangDependencyScanningExtending the explicit debug‑mode
target_link_libraries(llvm-libs ...)set withclangDependencyScanningis consistent with the xmake configuration and required for the new dependency scanning usage in tests/server. This looks correct; just confirm that the LLVM distribution you pin (21.1.4) ships this library on every supported platform so debug builds don’t hit missing‑symbol issues.tests/unit/Compiler/CompilerTests.cpp (1)
8-9: Dependency scanning test is currently a no‑op placeholderThe new
ScanDepstest successfully wiresDependencyScanningService/DependencyScanningTooland exercisesgetDependencyFile, which is useful to validate headers and linking. However, it doesn't currently assert anything (the TODO insideif (!err)is empty), so it won't catch regressions beyond compilation/link success.Consider:
- Adding a direct include for the service header (e.g.
DependencyScanningService.h) instead of relying on transitive includes, and- Either adding at least a minimal assertion around the
Expected<>result or clearly marking this test as TODO/disabled until you define what behavior you want to guarantee.This keeps the test suite meaningful once dependency scanning behavior stabilizes.
Summary by CodeRabbit
Chores
Tests
✏️ Tip: You can customize this high-level summary in your review settings.