Conversation
|
Warning Rate limit exceeded@koudis has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 32 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (4)
WalkthroughAdds a new public cache option Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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: 2
🤖 Fix all issues with AI agents
In @README.md:
- Around line 84-103: Fix the typo and clarify
CMCONF_SYSTEM_NAME_OVERRIDE_ALLOWED behavior: change "occure" to "occurs" and
update the description for CMCONF_SYSTEM_NAME_OVERRIDE_ALLOWED to state that
when set during a normal CMake project configure it allows changing the system
name and emits a warning, but when used during installation via the example
config script (e.g., running CMCONF_EXAMPLEConfig.cmake with -P or with
CMCONF_INSTALL_AS_SYMLINK/CMCONF_UNINSTALL) it results in a configuration error;
reference the symbols CMCONF_SYSTEM_NAME_OVERRIDE_ALLOWED,
CMCONF_INSTALL_AS_SYMLINK, CMCONF_UNINSTALL, and CMCONF_SYSTEM_NAME in the
revised sentence.
- Line 101: Clarify the placeholder in the example command by replacing
`<CMakeProjectPath>` with a more descriptive label and short note; update the
example `cmake -DCMCONF_SYSTEM_NAME_OVERRIDE_ALLOWED=ON
-DCMCONF_SYSTEM_NAME=MY_EXAMPLE <CMakeProjectPath>` to use
`<path-to-cmake-project>` (or similar) and add a one-line parenthetical
explaining it refers to the directory containing the CMakeLists.txt / project
root to be configured (not the CMake binary or installation).
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
CMCONF.cmakeREADME.mdresource/CMakeLists.txt.intest/CMakeLists.txttest/test_cases/fail/install_with_override_allowed/CMakeLists.txttest/test_cases/pass/system_name_override_allowed/CMakeLists.txttest/test_cases/pass/system_name_override_allowed/test_config/CMakeLists.txttest/test_cases/pass/system_name_reinit_same/CMakeLists.txt
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-02T17:36:23.478Z
Learnt from: koudis
Repo: cmakelib/cmakelib-component-cmconf PR: 1
File: test/test_cases/fail/variable_not_defined/CMakeLists.txt:17-23
Timestamp: 2025-08-02T17:36:23.478Z
Learning: The cmake_language(DEFER) construct is not available in CMake script mode, only in project mode, making it unsuitable for tests that need to run in both modes.
Applied to files:
test/test_cases/fail/install_with_override_allowed/CMakeLists.txttest/test_cases/pass/system_name_override_allowed/CMakeLists.txttest/test_cases/pass/system_name_override_allowed/test_config/CMakeLists.txt
🔇 Additional comments (10)
test/test_cases/pass/system_name_override_allowed/test_config/CMakeLists.txt (1)
1-19: LGTM!The test configuration correctly validates the override behavior: enabling
CMCONF_SYSTEM_NAME_OVERRIDE_ALLOWED, initializing with two different system names, and verifying that the second name takes effect. The parent test file handles verifying the warning message output.test/CMakeLists.txt (1)
24-25: LGTM!New test cases are properly registered in their respective sections (pass/fail) and maintain consistency with the existing test structure.
Also applies to: 34-34
resource/CMakeLists.txt.in (1)
12-14: LGTM!The guard correctly prevents configuration installation when
CMCONF_SYSTEM_NAME_OVERRIDE_ALLOWEDis enabled. The placement before the package config filename resolution ensures early failure with a clear error message.test/test_cases/pass/system_name_override_allowed/CMakeLists.txt (1)
1-18: LGTM!The test correctly validates that the warning message is emitted when overriding the system name. The regex pattern properly escapes brackets for CMake string processing and matches the expected
_CMCONF_MESSAGEoutput format.test/test_cases/pass/system_name_reinit_same/CMakeLists.txt (1)
1-24: LGTM!Excellent test coverage for the case-insensitive re-initialization scenario. The test validates that calling
CMCONF_INIT_SYSTEMwith normalized-equivalent names ("TEST_REINIT"and"test_reinit") proceeds silently without errors or warnings, confirming the documented behavior.test/test_cases/fail/install_with_override_allowed/CMakeLists.txt (1)
1-29: LGTM!The test comprehensively validates the installation guard behavior: it triggers installation with override enabled, expects failure, and verifies the specific error message. The regex pattern correctly handles potential formatting variations in the error output.
CMCONF.cmake (4)
114-117: LGTM!The new cache option is properly defined with appropriate type, default value (OFF for backward compatibility), and descriptive help text.
182-189: LGTM!Documentation clearly explains the three scenarios: fatal error by default, warning with override when allowed, and silent re-initialization for identical names.
206-210: LGTM!The override logic correctly branches based on
CMCONF_SYSTEM_NAME_OVERRIDE_ALLOWED. The warning message includes both old and new system names, and execution continues to update the cache property on line 213.
504-506: LGTM!Correctly propagates
CMCONF_SYSTEM_NAME_OVERRIDE_ALLOWEDto the child CMake process during installation. This ensures the guard inresource/CMakeLists.txt.incan detect and reject installation attempts when override is enabled.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary by CodeRabbit
New Features
Installation
Documentation
Tests
✏️ Tip: You can customize this high-level summary in your review settings.